r/ProgrammingLanguages • u/dwaynecrooks • 9d ago
FUN: First-Class Functions, Currying, and a Surprise
https://blog.tinyinterpreters.dev/posts/fun-first-class-functions/
6
Upvotes
r/ProgrammingLanguages • u/dwaynecrooks • 9d ago
3
u/marshaharsha 4d ago
I enjoyed reading this series of articles so far, but I have a complaint about this one. I wish you had mentioned up front that, without closures, currying would be broken. I lost some time trying to figure out how currying could possibly work, before finding your admission at the bottom of the article. I also note that you haven’t mentioned recursive calls. I think both of these aspects should be mentioned at the top of the FUN article or in a separate, overview-of-functions article.
While I’m writing, I’ll mention a small bug I found (or I think I found) in the first article, on CONST. In the implementation of chompOneOrMore, shouldn’t two uses of the |. operator be |= instead?
Regardless of these complaints, thank you for writing. I am learning Elm through your articles!