You can do it in Python as you have, but it becomes second nature with Haskell (I can't speak to Elm directly). You might not even realize you're doing it.
Add 5 to each num in a list (using a pretend function called `add` in both languages to be fair):
Sorry, but there is nothing more explicit about using lambdas as you have done, it's simply redundant (notice the repetition of sublist and num arguments).
Comments
You can do it in Python as you have, but it becomes second nature with Haskell (I can't speak to Elm directly). You might not even realize you're doing it.
Add 5 to each num in a list (using a pretend function called `add` in both languages to be fair):
Add 5 to each in a list of list of numbers:I suppose it would make more sense to write these as lambdas in a c style syntax
Maybe I haven't done enough functional programming yet, but I still like the explicitness of the C-style over the functional style.Sorry, but there is nothing more explicit about using lambdas as you have done, it's simply redundant (notice the repetition of sublist and num arguments).