(define subset? (lambda (st1 st2)
(cond
((not (set? st1))
(error "Your first argument is not a set!"))
((not (set? st2))
(error "Your second argument is not a set!"))
((null? (st1)) #t)
((in? ((car st1) st2)) (subset? ((cdr st1) st2)))
(else #f)
)))
I have written this code to check whether the first list appears in the second, i.e. second contains the first. Everything seems fine to me but it says object bla bla (first list is shown) is not applicable.
Any help will be appreciated. Should be easy one, but couldn't see it.