|
|
|
|
|
by davedx
4774 days ago
|
|
> There are certain problems that lend themselves well to the functional style, mainly those where you are piping a piece of data through various functions and applying different transformations to it. I don't quite understand this - how does this fit into the 'immutability' of fp? So functions can mutate data that goes into them, but they can't maintain internal state? |
|
This is how e.g. Array.prototype.filter() works in JavaScript: