Extension methods for functions with arity 1 (functions that take exactly 1 argument).
Static methods
staticinlinecompose<TIn, TRet1, TRet2>(fa:TRet2 ‑> TRet1, fb:TIn ‑> TRet2):TIn ‑> TRet1
compose
returns a function that calls the first argument function with the result
of the following one.
staticinlinecontramap<A, B, C>(fbc:B ‑> C, fab:A ‑> B):A ‑> C
The contravariant functor for Function1<_, B>. Equivalent to compose.
staticinlinejoin<TIn>(fa:TIn ‑> Void, fb:TIn ‑> Void):(v:TIn) ‑> Void
join
creates a function that calls the 2 functions passed as arguments in sequence
and passes the same argument value to the both of them.
staticmemoize<TIn, TOut>(callback:TIn ‑> TOut, ?resolver:TIn ‑> String):TIn ‑> TOut
memoize
wraps callback
and calls it only once storing the result for future needs.
Computed results are stored in an internal map. The keys to this map are generated by the resolver function that by default directly converts the first argument into a string.
staticinlinenegate<T1>(callback:T1 ‑> Bool):(v:T1) ‑> Bool
Wraps callback
in a function that negates its results.
staticinlineswapArguments<T1, T2, TReturn>(callback:(T1, T2) ‑> TReturn):(T2, T1) ‑> TReturn
Returns a function that behaves the same as callback
but has its arguments inverted.