#4189: (<.>) operator (generalizing (.) to Functor)
---------------------------------+------------------------------------------
Reporter: uzytkownik | Owner:
Type: feature request | Status: new
Priority: normal | Component: libraries/base
Version: 6.12.3 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Currently there are following operators:
{{{
(<$>) :: (a -> b) -> f a -> f b
($) :: (a -> b) -> a -> b
(.) :: (b -> c) -> (a -> b) -> a -> c
}}}
However defining the operator that is to <$> as . is to $ is trivial:
{{{
(<.>) :: (b -> c) -> (a -> f b) -> a -> f c
f <.> g = fmap f . g
}}}
It would help writing in pointless style using Functors (as well as
Applicatives/Monads etc.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4189>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs