3 ms·
What does FP wrappers mean in this context? Someone asked that in the Twitter thread and got a snarky response, but I have the same question.
by neonate 4y ago
What does FP wrappers mean in this context? Someone asked that in the Twitter thread and got a snarky response, but I have the same question.
- rahkiin 4y agoI think they mean what in lodash was _() and .values(): You could not execute map or filter on an array. Instead you needed to wrap it in a lodash object using _(arr), that you can call .filter() on. To get the filterd values out, you call .values() on its result. You could also do _.filter(arr, …). To me it became confusing when I needed to use .values, and when nesting it got worse. LINQ has instead methods on its types that partially returns builders. I find that easier to use, and using C# type system it calculates the result types for me.