This commit is contained in:
Felix Brendel
2019-06-06 15:57:04 +02:00
parent 582022601c
commit d01269aa13
5 changed files with 21 additions and 10 deletions
+7 -2
View File
@@ -139,16 +139,21 @@ ithe sequence as arguemens."
(define (lambda? x)
"Checks if the argument is a function."
(= (type x) :dynamic-function))
(= (type x) :lambda))
(define (special-lambda? x)
"Checks if the argument is a macro."
(= (type x) :dynamic-macro))
(define (built-n-function? x)
(define (built-in-function? x)
"Checks if the argument is a built-in function."
(= (type x) :built-in-function))
(define (callable? x)
(or (lambda? x)
(special-lambda? x)
(built-in-function? x)))
(define (end seq)
"Returns the last pair in the sqeuence."
(if (or (nil? seq) (not (pair? (rest seq))))