(&)

I have just begun my journey in Haskell-land and like other newcomers I’m trying to make myself at home…

When I saw the $ operator in Haskell I immediately wanted an operator where the two operands have switched places. Why? Because the order in the following expression feels very wrong to me as a long-time Ruby user.

takeWhile (<64) $ map (^2) [1..]

So…

Here’s the & operator:

(&) = flip ($)

It’s used like this:

[1..] & map (^2) & takeWhile (<64)

Much more like home!

WTF?

Yes, this is quite silly indeed.