Using "this" as data input and pure functions concept
andreventuravale opened this issue · comments
andreventuravale commented
Hi,
Given a pure function like:
function add2(x) {
return x + 2
}
And a conceptual equivalent in Trine's approach ?
function add2() {
return this + 2
}
Would the use of "this" as data input invalidate the pure nature of the function ?
Thanks.
PS: I am unsure if this is the best place to ask such question, please let me know of other channels.