I am trying to write a scheme function that takes a list of the form:
((#f ((1 1) (2 1)))
(#f ((1 3) (5 1)))
(#f ((1 4) (7 1)))
)
and removes all the #f to give a list like:
( ((1 1) (2 1))
((1 3) (5 1))
((1 4) (7 1))
)
I have tried the following code but cannot get it to work:
(define meth
(lambda lst
(if (equal? (cdr lst) '())
(cdr (car lst))
(cons (list-ref (car lst) 1) (meth (cdr lst))))))
Does anyone know how to do this? Thanks.