[SO] Modifing local class instance in pure function

BCS ao at pathlink.com
Thu Jun 18 16:14:00 PDT 2009


Reply to div0,

> Pure functions are not allowed to alter global state. That's what you
> doing when you create a new object.
> 
> http://en.wikipedia.org/wiki/Functional_programming
> 

Based on that, cons makes lisp not functional.




More information about the Digitalmars-d-learn mailing list