diff options
| author | Chouser <chouser@n01se.net> | 2015-02-21 23:15:23 -0500 |
|---|---|---|
| committer | Chouser <chouser@n01se.net> | 2015-02-23 22:22:01 -0500 |
| commit | e46223c2b7ac3579d174386df8e1c0aa8a48d2b0 (patch) | |
| tree | c300a107afa499d729c23e1f7c6e07e3505e8afa /forth/stepA_interop.fs | |
| parent | 2a42d8274072c44dd2d83762cc27cd810f5b8452 (diff) | |
| download | mal-e46223c2b7ac3579d174386df8e1c0aa8a48d2b0.tar.gz mal-e46223c2b7ac3579d174386df8e1c0aa8a48d2b0.zip | |
forth: Add . interop special operator and tests
Diffstat (limited to 'forth/stepA_interop.fs')
| -rw-r--r-- | forth/stepA_interop.fs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/forth/stepA_interop.fs b/forth/stepA_interop.fs index 0a4050a..9a39889 100644 --- a/forth/stepA_interop.fs +++ b/forth/stepA_interop.fs @@ -261,6 +261,13 @@ defspecial try* { env list -- val } catch-env catch0 cell+ @ TCO-eval endif ;; +defspecial . { env coll -- rtn-list } + depth { old-depth } + coll to-list dup MalList/count @ swap MalList/start @ { count start } + count cells start + start cell+ +do + env i @ eval as-native + cell +loop ;; + MalSymbol extend mal-eval { env sym -- val } 0 sym env get |
