aboutsummaryrefslogtreecommitdiff
path: root/ps/step3_env.ps
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-03-30 22:39:44 -0500
committerJoel Martin <github@martintribe.org>2014-03-30 22:39:44 -0500
commit8e7e339db8060f95d27694b93b8d4d648d13c083 (patch)
tree53aeff225a82a2256970140d8792a8f5ed3d6fb8 /ps/step3_env.ps
parent54c75382653d1bd4da7628c04aa9382af8add912 (diff)
downloadmal-8e7e339db8060f95d27694b93b8d4d648d13c083.tar.gz
mal-8e7e339db8060f95d27694b93b8d4d648d13c083.zip
PS: add step7_quote
Diffstat (limited to 'ps/step3_env.ps')
-rw-r--r--ps/step3_env.ps7
1 files changed, 3 insertions, 4 deletions
diff --git a/ps/step3_env.ps b/ps/step3_env.ps
index 02b3e8d..5feae46 100644
--- a/ps/step3_env.ps
+++ b/ps/step3_env.ps
@@ -13,9 +13,9 @@
/env exch def
/ast exch def
%(eval_ast: ) print ast ==
- /nametype ast type eq { %if symbol
+ ast _symbol? { %if symbol
env ast env_get
- }{ /arraytype ast type eq { %elseif list
+ }{ ast _list? { %elseif list
[
ast {
env EVAL
@@ -30,7 +30,7 @@ end } def
/env exch def
/ast exch def
%(EVAL: ) print ast ==
- /arraytype ast type ne { %if not a list
+ ast _list? not { %if not a list
ast env eval_ast
}{ %else apply the list
/a0 ast 0 get def
@@ -54,7 +54,6 @@ end } def
/el ast env eval_ast def
el _rest % args array
el _first cvx % function
- %(vvv\n) print pstack (^^^\n) print
exec % apply function to args
} ifelse } ifelse
} ifelse