
20 Nov
2010
20 Nov
'10
12:10 p.m.
Hi, I really like fooling around with operators. In elementary school, we always had to make chain computations, e.g. teacher: 2 teacher: +1 teacher: *2 teacher: divided by 3 Again, I didn't find the following operator on hoogle (very similar to ($)): (->>) :: a -> (a -> b) -> b a ->> f = f a Using it, we can nicely write down the above computation: 2 ->> (+1) ->> (*2) ->> (`div` 3) Cheers Tim