Control Functions.when

Conditionally executes a callable if a condition is TRUE, does nothing otherwise.

Arguments

If

condition
is TRUE, the callable is executed, no effect otherwise.
body
is the callable to execute.

Return values

None

Example

"sl/control" useFile i: 0; [i 5 < ] [ i 3 = ~ [ i print ] when i 1 + !i ] while
Output:
0124