snds is a collection of nodes , which has the attribute of 'alloc'. the following two statements looks equivalent to me, but the first throw error AttributeError: 'int' object has no attribute 'alloc'
I might have made some stupid mistake some where which I can't discover.
#return reduce( lambda x,y:x.alloc+y.alloc, snds)
return reduce( lambda x,y:x+y, map( lambda x:x.alloc, snds) )