DEV Community

loading...

Discussion on: WTF Is a Lambda?

Collapse
tamas profile image
Tamás Szelei

I think it's worth pointing out that a lambda is not simply a shorthand for function declaration. IsAmy is a function. The other two variants are both lambdas and they differ from functions in that they capture all the locals and globals that are visible in the scope where the lambda is defined. IsAmy has no access to those.

Collapse
jonhilt profile image
Jon Hilton Author

Thanks for this, an important clarification and I appreciate you taking the time to outline it here :-)