4 ms·
the term 'function' refers to a true function, no side effects. So, when I say "FP", that's what I mean. >so I'd actually disagree and say that your Scala cod
by runT1ME 10y ago
the term 'function' refers to a true function, no side effects. So, when I say "FP", that's what I mean.
>so I'd actually disagree and say that your Scala code isn't FP, since it emphasizes transformations on an object.
What I wrote is no different than
change(oldData) |> map(x => x+1) |> filter(x => isTrue(x)
Often the '.' style in scala is literally syntactic sugar that will get rewritten to pass the data to a stand alone function.