add simple <=, >= and list?.
This commit is contained in:
parent
c4d3d26f8d
commit
f1bd1d461f
12
scm.mes
12
scm.mes
|
@ -108,6 +108,18 @@
|
|||
(cond (x #f)
|
||||
(#t #t)))
|
||||
|
||||
(define (<= a b) ;; FIXME: only 2 arg
|
||||
(or (< a b)
|
||||
(= a b)))
|
||||
|
||||
(define (>= a b) ;; FIXME: only 2 arg
|
||||
(or (> a b)
|
||||
(= a b)))
|
||||
|
||||
(define (list? x)
|
||||
(or (null? x)
|
||||
(and (pair? x) (list? (cdr x)))))
|
||||
|
||||
(define-macro (if expr then . else)
|
||||
`(cond
|
||||
(,expr ,then)
|
||||
|
|
Loading…
Reference in a new issue