[Haskell-beginners] "Shortcut" for f (g x) (g x)

Baa aquagnu at gmail.com
Mon Dec 4 16:51:31 UTC 2017


Oh, yes! Exactly, thanks to all!!

> Hi!
> 
> I think you're looking for Data.Function.on:
> http://hackage.haskell.org/package/base-4.10.0.0/docs/Data-Function.html#v:on
> 
> On 04/12/2017, Baa <aquagnu at gmail.com> wrote:
> > Hello, All!
> >
> > Does Haskell have some "short-form" for such call: `f (g x) (g x)`,
> > for example:
> >
> >   compare (snd x) (snd x)
> >
> > Looks like combinatory logic or `ap` but not exactly...
> >
> > ===
> > Best regards, Paul
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
> >  
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners



More information about the Beginners mailing list