length-equal?   macro


Defined in:  https://github.com/lambdamusic/extempore-extensions/blob/main/init/init_lisp.xtm

Implementation

;
;
; shortcut for determining lists of equal length: takes both a list or a number for comparison
(define-macro (length-equal? x y)
   `(cond ((and (list? ,x) (list? ,y))
       	   (equal? (length ,x) (length ,y)))
           ((and (list? ,x) (number? ,y))
       	   (equal? (length ,x) ,y))
           (#t (print 'Error: 'length-equal? 'needs 'two 'lists 'or 'one 'list 'and 'a 'number))))


Back to Index