24 ms·
This isn't identical, but I remember when I first learned first-class functions and partial application in Haskell about ten years ago, it was a "the world is d
by tombert 8y ago
This isn't identical, but I remember when I first learned first-class functions and partial application in Haskell about ten years ago, it was a "the world is different now" moment. I had reinvented partial-application approximately thirty billion times by using overloading or with elaborate if-elseif-else chains. When I learned Haskell, and saw that I could magically make my non-lists function automatically lift across a list, and how I could define things like this myself, I was immediately convinced that I would never go back to C again (I didn't know about function pointers).
I learned Clojure about a year ago (which was my first introduction to Lisp outside of reading SICP), and it gave me a similar feeling. I felt like Clojure was a "better Java than Java", and now its my go-to JVM language. I think McCarthy was really onto something with Lisp :).
- joekunin 8y agoCould you give an example of partial application with Haskell in the way you mention? I've had similar feelings with Clojure.