On Thursday, 15 May 2014 at 21:48:16 UTC, Timon Gehr wrote:
The term "pure function" is only needed in a non-functional
language.
Applicative/functional languages only have mathematical
functions, no
need for the term "pure" there.
In discussions about e.g. Haskell, it is often used to denote
an expression of a specific form inside a `stateful' DSL. E.g.
if "η" is the unit of some monad, then (η v) is sometimes
called a "pure value", while values of other forms are not
called pure.
Yes, from haskell.org:
<<While programs may describe impure effects and actions outside
Haskell, they can still be combined and processed ("assembled")
purely, inside Haskell, creating a pure Haskell value - a
computation action description that describes an impure
calculation. That is how Monads in Haskell separate between the
pure and the impure.>>
So, I think my statement holds.