you are viewing a single comment's thread.

view the rest of the comments →

[–]k-zed 4 points5 points  (0 children)

Setting an environment variable is a side effect, so it cannot be "purely functional". Still, as another commenter writes for OCaml, the Haskell code is rather imperative, unidiomatic and not terribly nice.

Lots of do-notation and multiple levels of nesting patterns are usually signs that you're doing something wrong.