
On 01/08/10 22:15, Stephen Tetley wrote:
On 1 August 2010 20:57, Maciej Marcin Piechotka
wrote: Hmm. Do you have an idea for better name?
blackbirdA ?
For the function instance of Applicative its the blackbird combinator, unless I made a miscalculation when rewriting the signature.
Hmm. Looks like that but: - blackbirdA does not save much space - f `blackbirdA` g is *more* confusing then (f <$>) . g/ fmap f . g: const 1 <.> print <=< (read :: String -> Int) <.> readFile fmap (const 1) . print <=< fmap (read :: String -> Int) . readFile (const 1 <$>) . print <=< ((read :: String -> Int) <$>) . readFile const 1 `blackbirdA` print <=< (read :: String -> Int) `blackbirdA` readFile First shows the nearly-normal Haskell function pipeline. It's nearly: const 1 . print . read . readFile from non-pure languages (with added pureness) The last one is IMHO unreadable. It is much longer and does not 'graphically' represent flow of information. - blackbird is rather not widely known reference. Regards PS. I know, I know...