+ 4

Why learn lambda functions?

Are lambda functions really any useful (except creating one-liners)?Shall I consider learning them?

20th Jun 2019, 3:51 PM
Saksham Jain
Saksham Jain - avatar
3 Answers
+ 5
I would recommend to learn them. With some packages you would need to pass a function as an argument to another function call, then you would not be able to pass local arguments if required. Then you could use: func1(lambda x=x, y=y: func2(x, y)) If you used Tkinter that information could be useful.
20th Jun 2019, 4:14 PM
Seb TheS
Seb TheS - avatar
+ 2
Why not?
21st Jun 2019, 2:18 AM
Sonic
Sonic - avatar
+ 1
it is largely used in java streams
20th Jun 2019, 11:36 PM
zemiak