+ 3
What are actually lambda expressions?
I'm not much familiar with the functional programming paradigm. I have seen many programmers saying about lambda expressions but never got any idea regarding what it really is. What is its significance? Is it similar to anonymous inner classes which is used to instantiate interfaces?
2 Respuestas
+ 4
It's an "anonymous" function, which takes argument(s) and returns a value based on them. It is mostly used when there is no need for defining a whole new function.
In Python, it's often used in list (or other collectioslns) comprehensions:
https://code.sololearn.com/cJqu6Q00Gidt/?ref=app