From: Michael Neumann Date: 2001-10-12T07:04:08+09:00 Subject: [ruby-talk:22448] Re: list comprehensions alike Python ??? Piers Cawley wrote: > 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. Ok, but a circular data-structure is somehow "infinite". > 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. You're right. Correcting myself, put a "concepually" before "infinite data-structures". Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de