[Haskell-cafe] Missing `$` like operators in Haskell
Dan Burton
danburton.email at gmail.com
Fri Dec 12 02:58:46 UTC 2014
The lens package defines (&) and (<&>) as flipped ($) and (<$>),
respectively. There is nothing in the base package that defines those. <&>
is quite uncommon. Flipped ($) is something that crops up here and there.
Sometimes called (|>), or (#).
-- Dan Burton
On Thu, Dec 11, 2014 at 6:47 PM, Clinton Mead <clintonmead at gmail.com> wrote:
> Below are the `$` like operators in Haskell (view in fixed width):
>
>
> ---------------------------------------------------------------------
> | Function first | Op | Function second |
> Op |
>
> -------------------------------------------------------------------------------
> | Plain | (a -> b) -> a -> b | $ | a -> (a -> b) -> b |
> |
> | Functor | (a -> b) -> f a -> f b | <$> | f a -> (a -> b) -> f b |
> |
> | Applicat| f (a -> b) -> f a -> f b | <*> | f a -> f (a -> b) -> f b |
> <**> |
> | Monad | (a -> m b) -> m a -> m b | =<< | m a -> (a -> m b) -> m b |
> >>= |
>
> -------------------------------------------------------------------------------
>
> The "function second" forms I couldn't find for "plain" and "functor".
> What are the most common operators to used in these places?
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141211/72f90d05/attachment.html>
More information about the Haskell-Cafe
mailing list