|
|
|
|
|
by crimsonalucard
2391 days ago
|
|
The execution of the main function has side effects. All io functions have side effects that are only observable by main. The print function itself is a side effect. Yes I'm talking about Haskell. What the io monad does is force the user seperate pure functions and impure functions via type checking. I think it's sort of incorrect to say Haskell is pure. It's more that only from a certain perspective Haskell is pure. |
|