(Forgot reply all)

---------- Forwarded message ----------
From: "Mike Ledger" <eleventynine@gmail.com>
Date: 18 Aug 2016 7:52 AM
Subject: Re: [Haskell-cafe] Proposal: (.:) operator in base.
To: "Csongor Kiss" <kiss.csongor.kiss@gmail.com>
Cc:

IMO: I've never seen a compelling use of this; I think it decreases clarity, and barely shaves off any characters from equivalent "pointful" expressions.

On Thu, Aug 18, 2016 at 7:45 AM, Csongor Kiss <kiss.csongor.kiss@gmail.com> wrote:
Of course I meant to write ((->) e)

On 17 August 2016 at 22:39:36, Csongor Kiss (kiss.csongor.kiss@gmail.com) wrote:

Can you provide a bit more detail on why you think (fmap . fmap) captures
the concept behind (.) . (.) ? 
It certainly does generalise it in one way - and I do get how, but is it the *right* generalisation?

Or does it just coincide with (-> e)’s fmap being defined as (.), and in fact we would prefer to
generalise the composition aspect, in which case Category would be a more ‘obvious’ place to look?

On 17 August 2016 at 22:15:56, Tony Morris (tonymorris@gmail.com) wrote:

You'd generalise it to:

fmap . fmap :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)

And then, would you do the same for Traversable, Foldable and Applicative?


On 18/08/16 03:43, Alex Belanger wrote:
Hi,

Some of you might be familiar with (.:) = (.) . (.).

It has type :: (c -> d) -> (a -> b -> c) -> a -> b -> d

It allows the composition of two functions, the first one, accepting one operand, and the second, two operands.

This appears to be a very common pattern, referenced a bit everywhere, almost always defined on lambdabot and found in multiple codebases in the wild.

I'd like the know the general sentiment about this operator, as well as how its inclusion in base, probably Data.Function, would be perceived before I actually try to make it happen.

Cheers,
Alex (nitrix).


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.