on
(*) `on` f = \x y -> f x * f y.
Typical usage: Data.List.sortBy (compare `on` fst).
Algebraic properties:
* (*) `on` id = (*) (if (*) {¥, const ¥})
* (*) `on` f) `on` g = (*) `on` (f .
* on f . flip on g = flip on (g .
>
Like finally, but only performs the final action if there was an exception raised by the computation.
Please read the introduction at on-a-horse.org
Version 0.2
A handler for a decoding error.
All on one line
A handler for an encoding error.
oneOf cs succeeds if the current character is in the supplied list of characters cs. Returns the parsed character. See also satisfy.
> vowel = oneOf "aeiou"
Randomly uses one of the given generators. The input list must be non-empty.
Anonymous coproduct type (generalization of Either to choices among other than 2 cases)
Version 0.1.0.1
Function type for handling a coding error. It is supplied with two inputs:
* A String that describes the error.
* The input value that caused the error. If the error arose because the end of input was reached or could not be identified precisely, this value will be Nothing.
If the handler returns a value wrapped with Just, that value will be used in the output as the replacement for the invalid input. If it returns Nothing, no value will be used in the output.
Should the handler need to abort processing, it should use error or throw an exception (preferably a UnicodeException). It may use the description provided to construct a more helpful error report.
Singleton Tuple
Version 0.2.1
The only command-line tool lets you search based on word patterns or line patterns like never before! Not only can you search with 'only -l patt' but you can select the n-th match with '-l n/patt/' and the next 3 lines with '-l /patt/0:3'.
Version 0.0.6.0
Show more results