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…
You could almost say that, if there was any notion of purity in javascript. You don't get referential transparency within javascript so talking about purity in that case is really moot. The main point is: Within haskell…
That code is 100% pure, it is a value of type IO (), it can be passed to pure functions, kept in lists. It is a pure description of some impure actions. This is run by the runtime. But within haskell is 100% pure
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…
You could almost say that, if there was any notion of purity in javascript. You don't get referential transparency within javascript so talking about purity in that case is really moot. The main point is: Within haskell…
That code is 100% pure, it is a value of type IO (), it can be passed to pure functions, kept in lists. It is a pure description of some impure actions. This is run by the runtime. But within haskell is 100% pure