DEV Community

Discussion on: Every developers 'oh my god I get it' moment.

Collapse
 
antonrich profile image
Anton • Edited

Yes I had that same with reduce (to be precise with foldl and foldr in Haskell). When it clicked it was such a wonderful feeling.

Reduce is very powerful stuff.

I think a couple days ago I got what a flip function means.

flip f a b = f b a

It's useful when you want to partially apply a function but the arguments are not in the place where they should be. You just flip them and that's it.

It didn't click until I saw a good example.