diff --git a/doc/userdoc.org b/doc/userdoc.org index 203404c7c29e148df6479d5a0a21ddfcbb55f283..24bd03f3a93129837a209668696945cd7a3c8d08 100644 --- a/doc/userdoc.org +++ b/doc/userdoc.org @@ -2078,6 +2078,19 @@ or if ~(y1,...,ym)~ has already been defined in ~Y1*...*Ym~ *** Pure functions +In the ~pugs~ language, functions are *pure functions* in the sense that +arguments given to the function are *never* modified by the +functions. They act as operators. + +#+BEGIN_note +Actually these functions are not strictly /pure functions/ in the +computer science context. The reason for that is that they can +eventually have side effects. A good example for that, is that it is +possible to modify the random seed used by the code the code. In that +case, the modified value is not a variable of the language itself but +the internal random seed itself. +#+END_note + *** TODO Implicit type conversion for parameters and returned values *** TODO User-defined functions