On Mon, Aug 1, 2011 at 8:30 PM, Anand Chitipothu <[email protected]> wrote:

> I was trying to translate Python list-comprehensions into Javascript
> and here is what I've come up with.
>
> $pyjs.listcomp(
>    function(x, y, z) { return [x, y, z]},
>    [
>        range(1, 100),
>        function(x) { return range(x, 100)},
>        function(x, y) { return range(y, 100)},
>    ],
>    function(x, y, z) { return x*x + y*y == z*z;}
> )
>
> I haven't worked out the $pyjs.listcomp function implementation yet.
>
There's another one you might want to take a look at
http://rosettacode.org/wiki/List_comprehensions#JavaScript
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to