From: Piers Cawley Date: 2001-10-12T00:40:25+09:00 Subject: [ruby-talk:22436] Re: list comprehensions alike Python ??? Michael Neumann writes: > Pixel wrote: > > Luigi Ballabio writes: >> >> [...] >> >> > How about >> > >>> l = [(x,y) for x in range(1,5) for y in range(1,5) if x+y < 5] >> > >>> l >> > [(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (3, 1)] >> >> haskell could be > > Haskell even has infinite or circular data-structures. > It's a great language (I love it), but compared to Ruby (and other imperative languages) > it's hard to learn and understand, because it's pure functional. Ghod. Thought for a moment you said 'infinite circular data structures', and my brain started melting as I tried to work it out. And no, Haskell doesn't have infinite data structures, it has unbounded finite data structures as must any language that runs on a Universal Turing Machine or its moral equivalent. -- Piers