I am trying to implement a function (my-filter p lst) by using lambda, map and foldr.
What I have so far is:
(define (my-filter1 p lst)
(cond [(empty? lst) empty]
[(p (first lst))
(cons (first lst) (my-filter1 p (rest lst)))]
[else (my-filter1 p (rest lst))]))
It works fine, but I how can I change the code to one using lambda, map and foldr?
Thanks in advance!