Forgive this naive question, I am having some trouble understanding some matching forms. If I wanted to filter out odd numbers like this:
(filter odd? '(1 2 3 4 5)) => '(1 3 5) but I wanted to do this with a match: (define (filter-odds v) (match v [empty empty] [(cons (? odd? first) rest) (cons first (filter-odds rest))] [_ (filter-odds rest)])) (filter-odds '(1 2 3 4 5)) => '(1 2 3 4 5) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.