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.