
In case no one has already mentioned it, (<.>) = fmap.fmap, or more specifically, result.fmap (where 'result' comes from TypeCompose or DeepArrow). Usually I prefer this explicit style over ad hoc infix operators, as the explicit style illustrates and hints toward a more general situation, made up of compositions of first, second, result, fmap, etc. See http://conal.net/blog/posts/semantic-editor-combinators/ . - Conal On Sun, Aug 1, 2010 at 6:52 AM, Maciej Marcin Piechotka < uzytkownik2@gmail.com> wrote:
The proposal is to add (<.>) function to Data.Functor/Control.Applicative: (<.>) :: (b -> c) -> (a -> f b) -> a -> f c f <.> g = fmap f . g -- (<.>) = (.) . fmap
In intend it is related to <$> in the same way as (.) is related to $: (a . b . c) d = a $ b $ c $ d (a <.> b <.> c) d = a <$> b <$> c <$> d
a is not specialized to f a to allow such chaining: const 1 <.> print <=< (read :: String -> Int) <.> readFile :: (Num t) => FilePath -> IO t
Discussion deadline: 31th August 2010
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries