We can do that in OCaml, actually. I've seen at least three versions of this in the Net, one of them by me. Plus it also works with streams, arrays, etc.
Cheers, David On Sat, 2008-04-26 at 14:32 -0700, Arthur Chan wrote: > The python syntax goes further than just the "in" bit, in fact. They > can do list comprehensions like [for x in blah if f(x)]. Now every > functional guru will recognize this immediately as the bastardization > of List.filter. While it'd be nice to have that, I come across > List.filter much less than List.exists/mem. > > Whatever.... it's just a minor quibble, but this thread was about > syntax extensions, after all. -- David Teller Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations. _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs