
4 Dec
2017
4 Dec
'17
4:34 p.m.
You can use `liftM2 f g g`
For the example you mentioned, there's also
compare `on` snd
or
comparing snd
with the proper imports (Data.Ord, Data.Function)
On Mon, Dec 4, 2017 at 8:31 AM, Baa
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- Mihai Maruseac (MM) "If you can't solve a problem, then there's an easier problem you can solve: find it." -- George Polya