You can think of a functor as a box which is based around some value. Because this particular value is covered by our box, we can’t treat the value inside like the value that it is. Thankfully functors allow a certain behavior to get around the box. This behavior is called map.
map
To keep the post short and helpful, I’m assuming you’re already familiar with the Elm Architecture and a few of the language concepts. Every major code sample has a link to the full, working example on Ellie.
Over the past half year, I’ve had the SOLID principles of Object-oriented programming (OOP) drilled into my brain as I worked on honing my overall design sense in the quest to achieve software enlightenment.
When I first started learning Clojure a little over a month ago, I was encouraged to…
As you probably already know, Clojure employs a call by value parameter passing mechanism and is, in most cases, eagerly evaluated. So where does lazy evaluation fit into the language? The answer is in lazy sequences. Clojure has the ability to treat any data structure conforming to the…