purity question

Brad Roberts via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 28 16:49:16 PDT 2017


Is there a mechanism for declaring something pure when it's built from 
parts which individually aren't?

string foo(string s)
{
     // do something arbitrarily complex with s that doesn't touch 
globals or change global state except possibly state of the heap or gc
     return s;
}


More information about the Digitalmars-d-learn mailing list