If you import Control.Applicative , then
compose fgh = f <$> g <*> h
So you can write (==) <$> (myReverse . myReverse) <*> id $ [1..100]
<*> , specialized for functions, is equivalent to S-combinator :
sfgx = fx (gx)
Perhaps you can also use Control.Arrow :
compose fgh = g &&& h >>> uncurry f test = uncurry (==) <<< (myReverse <<< myReverse) &&& id $ [1..100]
Update
I asked lambdabot in #haskell the same question, and it just answered liftM2 .: D
source share