Luis Quesada <l.ques...@4c.ucc.ie> writes: >> [ id*v for id,v in enumerate(L) ] > Cool! Thanks!
If you really want to write that in pointfree style (untested): import itertools, operator ... itertools.starmap(operator.mul, enumerate(L)) For your other question, you could probably do something ugly with ifilter, but it's not worth it. For the style of programming you're interested in, you should read the docs for the itertools module. Python culture in general tends to not be that fond of heavy use of HOF's, since it's very easy to make mistakes with its iterator protocol and with its dynamic type system. -- http://mail.python.org/mailman/listinfo/python-list