Control Functions library
This is the list of control functions.
Stack manipulators
drop ( value -- ) drops the top element from stack
dup ( value -- value value ) duplicates the top element in stack
nip ( value0 value1 -- value1 ) drops the second element from stack
over ( value0 value1 -- value0 value1 value0 ) duplicates the second element in stack, duplicate will be on the top
swap ( value0 value1 -- value1 value0 ) swaps the top two elements in stack
Control flow
times ( ... count body -- ... ) executes body code a given number of times
when ( ... condition body -- ... ) executes body if a condition is TRUE, does nothing otherwise
while ( ... conditionBody loopBody -- ... ) executes a loop with a pre-condition
Functional
bind ( value body0 -- body1 ) binds a value to body code
func ( body -- callable ) wraps code into a callable structure
pfunc ( conditionBody body - callable ) overloads a callable by a condition and a body