Extension methods for functions with arity 0 (functions that do not take arguments).

Static methods

staticinline after (callback:Void ‑> Void, n:Int):Void ‑> Void

Returns a function that invokes callback after being being invoked n times.

staticinline join (fa:Void ‑> Void, fb:Void ‑> Void):Void ‑> Void

join creates a function that calls the 2 functions passed as arguments in sequence.

staticmemoize<TOut> (callback:Void ‑> TOut):Void ‑> TOut

memoize wraps callback and calls it only once storing the result for future needs.

staticinline negate (callback:Void ‑> Bool):Void ‑> Bool

Wraps callback in a function that negates its results.

staticinline once (f:Void ‑> Void):Void ‑> Void

once wraps and returns the argument function. once ensures that f will be called at most once even if the returned function is invoked multiple times.

staticinline times<T> (n:Int, callback:Void ‑> T):Void ‑> Array<T>

Creates a function that calls callback n times and returns an array of results.

staticinline timesi<T> (n:Int, callback:Int ‑> T):Void ‑> Array<T>

Creates a function that calls callback n times and returns an array of results.

Callback takes an additional argument index.