|
definition: |
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c on op f x y = f x `op` f y |
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
| `on f g x y` applies the binary operation `f` to the results of
applying operation `g` to two arguments `x` and `y`.
Thus, it transforms two inputs and combines the outputs.
(*) `on` f = \x y -> f x * f y
A typical usage of this operation is:
sortBy ((<=) `on` fst)
|
|
failfree: |
(_, _, _, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_,_) |-> _}
|
|
name: |
on |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
(a -> a -> b) -> (c -> a) -> c -> c -> b |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
yes |
|
totally-defined: |
reducible on all ground data terms |