We go from planned topic to full scale book review. But we've strung together a small string of victories, and that feels pretty good.
Prelude> oVer x = (\x -> (\x -> (\x -> x) 4 ) 3 ) 2
Prelude> oVer 4
Prelude> overWrite x = (\x -> (\x -> (\x -> x) ) )(2)(3)(4)
Prelude> overWrite 1
|>
)These let and where examples of using a lambda function may initially seem academic and contrived, but they’re the basis of one of the most important design patterns in JavaScript
It’s mind bending to me to have lambda expressions explained in a Haskell book, using JS. I need to remember all the little nuances of JS that I have absorbed over the years, and that other languages are the same.
JS using lambda functions to encapsulate scope.
Holy sh-nikes haskell uses lexical scope too. It even has a diagram.
JavaScript to Elm
Jesse Tomchak