[Tfug] Language wars ( was Language choices )
Robert Hunter
hunter at tfug.org
Sat Nov 4 18:14:48 MST 2006
Hi, Tim.
> Comp = list comprehension, a Python thing that's been very popular.
> mylist = [ item for item in yourList if item.age > 30 ]
Ah, yes. I learned about list comprehensions in Haskell. I didn't realize
they were in Python as well.
>> don't forget about Scheme and Perl ;-)
>
> Right. You should throw a few examples my way. I would like to see the
> Scheme.
Here is a combination generator I wrote in Scheme as a mental exercise
( i.e., it is not efficient, and chokes on large lists ).
http://vorpal-box.blogspot.com/2006/11/combinations-in-scheme.html
--
Rob
More information about the tfug
mailing list