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

Static methods

staticinlineafter(callback:() ‑> Void, n:Int):() ‑> Void

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

staticinlinejoin(fa:() ‑> Void, fb:() ‑> Void):() ‑> Void

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

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

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

staticinlinenegate(callback:() ‑> Bool):() ‑> Bool

Wraps callback in a function that negates its results.

staticinlineonce(f:() ‑> 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.

staticinlinetimes<T>(n:Int, callback:() ‑> T):() ‑> Array<T>

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

staticinlinetimesi<T>(n:Int, callback:Int ‑> T):() ‑> Array<T>

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

Callback takes an additional argument index.