Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $
- Besides lists, Elon has
- no real control structures.
- This creates a Symbol which
- runs a BASIC style for.
- ITERATIVE ONLY.
- STACK ARGS:
- -step count
- -end index
- -start index
- -routine list
- $
- {
- $ claim args $
- "c-step" define
- "c-end" define
- "c-start" define
- "routine" define
- c-start "counter" define
- set
- routine
- counter c-step add "counter" define
- counter c-end less { repeat } do
- forget
- "c-step" undefine
- "c-end" undefine
- "c-start" undefine
- "routine" undefine
- "counter" undefine
- } "for" define
- $ example usage $
- {
- counter print
- } 0 10 1 for
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement