I made a program that is supposed to put all the elements that are true for the predicate in a list. It does work but not for things like >, <, etc. It only works for things like zero? and negative? How can I make it so it works for <, >, etc?
(define (divide1 pred? ls)
(if (null? ls) '()
(if (pred? (car ls))
(cons (car ls) (divide1 pred? (cdr ls)))
(divide1 pred? (cdr ls)))))
~(divide1 zero? '(0 0 4 5))
(0 0)
~(divide1 < '(0 -5 8 5))
(-5 5) <- I think...