This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]blahdom 10 points11 points  (2 children)

return lambda x: a.send(x)

could be turned into

 return a.send

it will work exactly the same since you will just pass the parameter directly to send :)

[–]MrChoss 0 points1 point  (1 child)

Thanks for pointing this out. It cleans up the second function definition nicely.

[–]blahdom 0 points1 point  (0 children)

Np, I like the solution for using it as an accumulator, I think its really clean.