Why is std.algorithm.reduce impure?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Mar 6 14:41:01 PST 2012


Why is std.algorithm.reduce not marked pure? It makes it impossible to
do things like this:

	pure const int product(int[] args) {
		return reduce!"a * b"(args);
	}


T

-- 
Life is unfair. Ask too much from it, and it may decide you don't deserve what you have now either.


More information about the Digitalmars-d-learn mailing list