staticcurry<P1, P2, R> (f:P1 ‑> P2 ‑> R):P1 ‑> P2 ‑> R
Produces a function that produces a function for each parameter in the originating function. When these functions have been called, the result of the original function is returned.
staticdefer<P1, P2, R> (f:P1 ‑> P2 ‑> R, p1:P1, p2:P2):Thunk<R>
As with lazy, but calls the wrapped function every time it is called.
staticenclose<P1, P2, R> (f:P1 ‑> P2 ‑> R):P1 ‑> P2 ‑> Void
Produces a function that calls f
, ignoring the result.
staticflip<P1, P2, R> (f:P1 ‑> P2 ‑> R):P2 ‑> P1 ‑> R
Produces a function which takes the parameters of f
in a flipped order.
staticlazy<P1, P2, R> (f:P1 ‑> P2 ‑> R, p1:P1, p2:P2):Thunk<R>
Produdes a function that calls f
with the given parameters p1....pn
, and caches the result
staticreturning<P1, P2, R1, R2> (f:P1 ‑> P2 ‑> R1, thunk:Thunk<R2>):P1 ‑> P2 ‑> R2
Produces a function that calls f
, ignores its result, and returns the result produced by thunk.
staticswallow<P1, P2> (f:P1 ‑> P2 ‑> Void):P1 ‑> P2 ‑> Void
Produces a function that ignores any error the occurs whilst calling the input function.
staticswallowWith<P1, P2, R> (f:P1 ‑> P2 ‑> R, d:R):P1 ‑> P2 ‑> R
Produces a function that ignores any error the occurs whilst calling the input function, and produces d
if error occurs.
staticuncurry<P1, P2, R> (f:P1 ‑> P2 ‑> R):P1 ‑> P2 ‑> R
Takes a function with one parameter that returns a function of one parameter, and produces a function that takes two parameters that calls the two functions sequentially,