I am studying Racket (but probably the answer will be similar in any language of the Scheme and Scheme) and wonder how to filter the false (#f) values from this list. The best I came up with is:
(filter (lambda (x) (not (eq? x #false))) '("a" "b" #f 1 #f "c" 3 #f)) '("a" "b" 1 "c" 3) ;; output
However, I think there should be a simpler solution.
source share