I am trying to complete a school problem using lists in Racket. It is a simple problem using recursion but I cannot understand why my code won't work. We are supposed to search the list and return true if the item provided matches one in the list. This is what I have so far:
(define (containsAnywhere test list)
(cond
((null? list) '())
(equal?((car list) test))
(else(containsAnywhere (test (cdr list))))))
But I get the following error:
application: not a procedure;
expected a procedure that can be applied to arguments
given: 1
arguments.: