projects
/
scheme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
First pass at lambdas and closures
[scheme.git]
/
ast.scm
diff --git
a/ast.scm
b/ast.scm
index 05716e40814287b15a67cfe7a87b1339734f13b0..2ffad975f66f1ec4fbca3f32f095e484658ed726 100644
(file)
--- a/
ast.scm
+++ b/
ast.scm
@@
-21,3
+21,12
@@
(define (var? x)
(and (not (list? x)) (symbol? x)))
+
+(define (builtin? x)
+ (case x
+ ('+ #t)
+ ('- #t)
+ ('* #t)
+ ('! #t)
+ ('bool->int #t)
+ (else #f)))