diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/stdlib.stem | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/stdlib.stem b/examples/stdlib.stem index 00a4f67..a063c9b 100644 --- a/examples/stdlib.stem +++ b/examples/stdlib.stem @@ -9,3 +9,12 @@ loop [ swap 1 - swap loop ] [ dsc dsc ] if ] func + +# Author: Matthew H +dupd [ [ dup ] keep ] func +over [ dupd swap ] func +dup2 [ over over ] func +dip2 [ swap [ dip ] dip ] func + +loop-times [ dup2 [ swap [ ] if ] dip2 +dup [ 1 - loop-times ] [ dsc dsc ] if ] func |