News for hackers. Stuff that matters.
Re:JavaScript Isn't Scheme by gongador on Saturday July 20, 2013 @09:13AM (#6075127)
> ... which of course has no equivalent in Clojure, Scheme, or really any other language I can think of.

Python, for example: def cross(xs, ys): return [[x, y] for y in ys for x in xs]

LOOP in disguise :) (at least to my (very possibly faulty) understanding.)

Re:JavaScript Isn't Scheme by kragen on Saturday July 20, 2013 @02:07PM (#6075979)
A number of languages have listcomps that can do this, and which are actually more useful for this than CL's LOOP macro, but the thing I meant to point at was the APPENDING bit. I guess (loop for x in xs append (loop for y in (f x) collect y)) is awfully similar to [y for x in xs for y in f(x)], though.
Re:JavaScript Isn't Scheme by cgag on Sunday July 21, 2013 @02:01AM (#6077996)
Including Clojure for those who might not know:

    (defn cross [xs ys]
      (for [x xs, y ys]
        [x y]))