Until chapter 8 i had no problem to translate the code in newLISP.
But now i have the following function:
Code: Select all
(define (rember-f test?)
(lambda (a l)
(cond
((null? l) '())
((test? (first l) a) (rest l))
(true (cons (first l) ((rember-f test?) a (rest l)))))))Code: Select all
((rember-f =) 'tuna '(shrimp salad and tuna salad))Code: Select all
ERR: invalid function : (test? (first l) a)Code: Select all
(shrimp salad and salad)Thanks
cameyo