
Dear All During some recent discussion about different ways of sorting a list by some comparison function, one of the methods suggested was like this: sortByFunc = sortBy (compare `on` func) Now, I can imagine how this works, and I don't want to discuss the efficiency of this implementation (I imagine it's not "Schwartzian", for example;). I know what the backticks do (allow infix use of a function). My question is: what is "on"? I'm afraid I haven't been able to find anything about this, no doubt because of all the false positives coming up in searches. Please could someone tell me its official title, or where I could find it in the docs? Thanks and best wishes Ivan -- ============================================================ Ivan A. Uemlianin Speech Technology Research and Development ivan@llaisdy.com www.llaisdy.com llaisdy.wordpress.com www.linkedin.com/in/ivanuemlianin "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen" (Schiller, Beethoven) ============================================================

2009/6/26 Ivan Uemlianin
My question is: what is "on"? I'm afraid I haven't been able to find anything about this, no doubt because of all the false positives coming up in searches.
http://www.haskell.org/hoogle/?hoogle=on -- Erlend Hamberg ehamberg@gmail.com

Erlend Hamberg wrote:
2009/6/26 Ivan Uemlianin
: My question is: what is "on"? I'm afraid I haven't been able to find anything about this, no doubt because of all the false positives coming up in searches.
Wow that was fast! Thanks, I hadn't tried Hoogle before and what I needed was the top hit: http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Function.html#v%... Ivan -- ============================================================ Ivan A. Uemlianin Speech Technology Research and Development ivan@llaisdy.com www.llaisdy.com llaisdy.wordpress.com www.linkedin.com/in/ivanuemlianin "Froh, froh! Wie seine Sonnen, seine Sonnen fliegen" (Schiller, Beethoven) ============================================================
participants (2)
-
Erlend Hamberg
-
Ivan Uemlianin