|
|
|
|
|
by nilved
3562 days ago
|
|
Is Haskell's `(++) :: [a] -> [a] -> [a]` pure? What if I pass `unsafePerformIO` to it? For theoretical purposes it might make sense to say pure functions cannot call impure functions, but I think a more practical definition includes functions that are provided as arguments. |
|
I'd thought pureness was a property of function definitions, irrespective of what they get passed, but living in Javascript land I've never had occasion to be concerned with the distinction. I kind of suspect it's not really something that's useful to talk about.