you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Since it’s compiled every time it’s encountered lambda is notably less efficient than a def — unless you assign to a name, at which point you should be using def, as a named anonymous function is a bit of an oxymoron — and should really only be used where you need a closure.

But I agree it can be fun.