mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 15:27:36 +02:00
Added (if-syntax?)
This commit is contained in:
parent
5179f2261b
commit
03f30ecf56
1 changed files with 9 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue