Code Self Study Forum

Functional Programming in JavaScript

I’ve been learning haskell, and therefore pure functional programming, lately. In looking into monads and category theory, I found this interesting page relating not to Haskell but to JavaScript:

Kleisli Compositions in JavaScript

Apparently, the author of this post, Luis Atencio, has written a book called Functional Programming in JavaScript, which I now see is referenced in a previous post on this forum.

In the post above, the author makes use of a functionally-oriented JavaScript library called Ramda. It’s GitHub page is here.

I haven’t delved into functional programming in JavaScript much. I know someone who uses Elm for his front-end work, apparently for it’s functional orientation. However, I know that Brendan Eich, when he was first developing JavaScript, took some functional concepts from Scheme (which I know is not as functionally pure as Haskell or, I assume, Elm). So, it’s probably not so strange to use JavaScript for functional programming, and not necessarily have to use something like Elm, instead, for that purpose.

Anyway, I thought I might share what I found.

1 Like

I discovered that Josh had actually posted about this ten months ago, under a different category:

Functional Programming in JavaScript by Luis Atencio

1 Like

I read part of that book and want to go through it again. There are a lot of typos in the book’s code, but it’s interesting.

I saw this Ramda playlist on YouTube, but haven’t watched it yet.

(Side note: I moved this thread into the #general-discussion category, because of a feature change to the #programming-questions category.)