functional programming with map()

Pete Shinners shredwheat at attbi.com
Mon Feb 25 11:24:06 EST 2002


Donnal Walter wrote:
> But what is the functional equvalent of:
> 
> for x in items:
>     x.f()

if all "items" are the same class, you could get away with this,

map(class_of_x.f, items)




More information about the Python-list mailing list