
30 Sep
2010
30 Sep
'10
7:47 p.m.
Hi All, I was wondering, why there isn't a composition operator for applicative functors. Of course it is rather trivial to implement, but it is a useful feature: {-# LANGUAGE FlexibleInstances, UndecidableInstances #-} module ApplicativeComposition where import Control.Applicative class (Applicative f) => ApplicativeComposition f where (<.>) :: f (b -> c) -> f (a -> b) -> f (a -> c) instance (Applicative f) => ApplicativeComposition f where (<.>) f g = pure (.) <*> f <*> g Can this be added to later versions of haskell? Greets, Edgar