Well, it is confusing that an operator can be a variable. I must get a habit to understand the meaning by the site, not by the looks.-------- Original Message --------
Subject: Re: [Haskell-cafe] Comparing functions
From: Brandon Allbery <allbery.b@gmail.com>
To: Vlatko Bašić <vlatko.basic@gmail.com>
Cc: Haskell-Cafe <haskell-cafe@haskell.org>
Date: 11.07.2013 21:03
On Thu, Jul 11, 2013 at 2:58 PM, Vlatko Basic <vlatko.basic@gmail.com> wrote:
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?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
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 associatesunix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net