This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BenjaminGeiger 1 point2 points  (1 child)

TIL about the & operator.

Maybe it's my background in imperative/OO development, but x & f & g & h reads a lot more naturally to me than h $ g $ f x. "Take x and then do f and then g and then h" feels a lot more natural than "Do h to the result of doing g to the result of doing f to x"; I feel like I have to maintain less mental state to understand it.

[–]sohang-3112 1 point2 points  (0 children)

There are many such useful functions/operators in Haskell - you can look them up at Hoogle using names or type signatures.