Pure and higher-order functions

mist none at none.none
Fri Feb 24 03:56:06 PST 2012


Ok, finally understood.

I was trying to declare hof like this: void f2( pure int 
function() param ) , similar to the way I declare usual pure 
functions. Looks like it is syntax error and only void f2( int 
function() pure param ) is allowed. That led me to false 
conclusion, that such signature is not allowed at all.

Are there any reasons for this inconsistency?


More information about the Digitalmars-d-learn mailing list