On on (was: [GHC] #971: Add intercalate and split to Data.List)
Nils Anders Danielsson
nad at cs.chalmers.se
Thu Nov 2 09:28:28 EST 2006
On Mon, 30 Oct 2006, Jón Fairbairn <jon.fairbairn at cl.cam.ac.uk> wrote:
> We can write “groupBy (\a b -> p a && p b)” [...]
You mean “groupBy ((&&) `on` p)”, right? ;)
Do you consider on to be above or below the Fairbairn threshold, by
the way? I think it is above the threshold since
* we get rid of two lambdas,
* we get rid of the duplication of p,
* and, most importantly, it is easier at a glance to tell what the
function does (assuming one knows about on).
--
/NAD
More information about the Libraries
mailing list