News for hackers. Stuff that matters.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by pg on Tuesday January 15, 2008 @01:49AM (#98589)
Close, except trues returns the values returned by the function, not the elements for which the function returned true.

  (def keep (f seq) (rem [no (f _)] seq))

  (def trues (f seq) (rem nil (map f seq)))

There are no comments on this comment yet.