4 ms·
That function isn't referentially transparent as enforced by the language/compiler, doing no effects in a function isn't the same as having a referentially tran
by papamonad 5y ago
That function isn't referentially transparent as enforced by the language/compiler, doing no effects in a function isn't the same as having a referentially transparent function. Nothing is stopping you from logging/introducing side effects in (a,b) => a + b; you chose not to which doesn't make it referentially transparent. Being enforced or statically guaranteed is what makes haskell have purity and js not have it.