Hi,
The return value from a lambda gets "int'ified" so I am not able to distinguish a "return 0;" from a "return UNDEFINED;".
I guess it's not too hard to fix, but might break something?
Is there a workaround.. what can I do?
Ex: Pike v7.7 release 9 running Hilfe v3.5 (Incremental Pike Frontend)
function a = lambda( int b ){ if( b > 0 ) return b-1; if( b == 0 )
return UNDEFINED; };
a(2);
(2) Result: 1
a(1);
(3) Result: 0
zero_type(_);
(4) Result: 0
a(0);
(5) Result: 0
zero_type(_);
(6) Result: 0 // would like zero_type to return 1 here!
a(-1);
(7) Result: 0
zero_type(_);
(8) Result: 0 // I expected UNDEFINED, since nothing was
// returned from the lambda..
//K