News for hackers. Stuff that matters.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by mnemonicsloth on Monday January 14, 2008 @10:31PM (#98501)
You're just confused by some syntactic sugar. [uvar _ topcolor] is shorthand for (lambda (x) (uvar x topcolor)), according to "Arc at 3 Weeks"

each = mutant foreach

dedup = remove duplicates

(trues [] (keys profs*)) would mean "map the lambda (predicate) over the list of keys to the hash of profiles, returning a list of elements for which it returned #t."

A few more specifics about the application and language would make this comprehensible.

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)))