我正在尝试完成两个数组。例如,有l1喜欢'(1 2 3),另一个是l2喜欢'(2 1 3)。它应该返回#t。但是当我运行它时会出错。 set-euqal ?:模块中的未绑定标识符:set-euqal?
(define check_length
(lambda (a b)
(cond
((= a b)#t)
((> a b)#f)
((< a b)#f))))
(define (subset? l1 l2)
(or (null? l1)
(and (member (car l1) l2)
(subset? (cdr l1) l2))))
(define (set-equal? l1 l2)
(and (subset? l1 l2)
(subset? l2 l1)))
(define equals
(lambda (BST value)
(cond
((bst-isempty? BST) #f)
((check_length (length BST) (length value)))
((set-euqal? (BST) (value)))
(else #f))))