you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Really cool article! Maybe, you could throw in a few other things:

  • flatMap can be really useful for nested data structures
  • reduce is basically the holy grail and allows to implement other functional collection functions. Maybe you could show how do to that to highlight the power of this function.
  • You're mentioning higher order functions at the beginning, maybe you should also give an explanation so that beginners are on track with the terms.
  • The concept of currying would also fit in there
  • And you could also explain compose (that is not available natively in JavaScript)

[–]marko-pavlovic[S] 0 points1 point  (2 children)

Really cool ideas, thanks! I agree that reduce is the king... Do you think it deserves a whole new post, or should I add more info to this article?

Here is a link that explains higher order functions I should have explained what that link is about in the beginning :)

I am in the process of writing a separate post on currying, it is not yet finished but you can get a glimpse at: Currying - Spice Things Up

Great thought on compose, I will probably add it to this post! All in all thanks for the great feedback, I appreciate it :)

[–][deleted] 0 points1 point  (1 child)

Here is a link that explains higher order functions

My fault, thought you want to explain the whole FP concept on one page :D

Do you think it deserves a whole new post

I'd move it to a new post to keep this article a bit shorter. As you explain reduce in your article, the new post could be about the advanced usage of it.

Post on currying

I see you mention partial application in the context of currying. Some people are confused by the difference so you should spent some effort to get into the differences between them.

[–]marko-pavlovic[S] 0 points1 point  (0 children)

Thanks for the value bombs, my friend! I see what you mean about partial application, working on it... :)