Added (if-syntax?)

This commit is contained in:
Justin Ethier 2016-12-07 21:28:24 +00:00
parent 5179f2261b
commit 03f30ecf56

View file

@ -13,6 +13,7 @@
;; Code analysis
tagged-list?
if?
if-syntax?
begin?
lambda?
pair->list
@ -90,6 +91,14 @@
(define (if? exp)
(tagged-list? 'if exp))
(define (if-syntax? exp)
(and
(if? exp)
(or
(= (length exp) 3)
(= (length exp) 4))))
; begin? : exp -> boolean
(define (begin? exp)
(tagged-list? 'begin exp))