[Haskell-cafe] Comparing functions

Brandon Allbery allbery.b at gmail.com
Thu Jul 11 21:03:04 CEST 2013


On Thu, Jul 11, 2013 at 2:58 PM, Vlatko Basic <vlatko.basic at gmail.com>wrote:

> Hm, I thought it is a pattern match with constant, as in f ('a':xs) ==
>>
>
>  I wonder what you'd make of this definition, then?
>
>      (*) `on` f = \x y -> f x * f y
>
>
> According to the enlightenment above, I'd say (*) is a variable that holds
> some function/operator that is applied on (f x) and (f y),  not the
> multiplication, right?
>

Correct. But if it's a variable there, why would you expect it to be a
constant in a different pattern?

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130711/913b0d17/attachment.htm>


More information about the Haskell-Cafe mailing list