4 ms·
> The price for that limited scope is that it is much harder to figure out what is actual parameter of lambda that goes into map function I’m not sure why that
by setr 5y ago
> The price for that limited scope is that it is much harder to figure out what is actual parameter of lambda that goes into map function
I’m not sure why that soul would be the case... it’s whatever came out of the previous action? You’re doing list operations...always.
Nested list operations get convoluted fast, so I generally avoid them (break them up into separate iterations) but otherwise. The only thing I can remember complicating things is issues with type conversion, but the IDE usually tells you what’s up.
The loss of print debugging and useful debugger support is a pain but usually resolved by commenting out half the manipulations and printing immediately.
Otherwise IME it’s a lot simpler to see a series of independent operations on the total list, then it is to follow a for loop interacting with one element at a time.
But personally I switch between the two styles freely, depending on which one is “cleaner” so I likely naturally avoid the more convoluted/difficult cases.