diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-11-21 23:23:23 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-11-21 23:23:23 +0100 |
commit | 206689c943ba93ad48ce2b41166ca1902ed920a9 (patch) | |
tree | 6158a8e74c4b822a87bb104df2946238db039ffb /VM.hs | |
parent | 8114c68b9f42a9273109ad95cf1a76544ceb52a1 (diff) |
cons, cond, exit
Diffstat (limited to 'VM.hs')
-rw-r--r-- | VM.hs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -127,6 +127,7 @@ vmRunBuiltin state "cdr" [RVList l] = case l of _ : a -> return (RVList a, state) _ -> throw "Empty list in 'cdr'" vmRunBuiltin state "list" values = return (RVList values, state) +vmRunBuiltin state "cons" [val, RVList l] = return (RVList (val : l), state) vmRunBuiltin state "sys-open-file" [RVNum modenum, RVString path] = do let mode = [ReadMode, WriteMode] !! modenum fid = sUniq state |