Thanks.
On Mon, 6 Nov 2017, Brad Chamberlain wrote:
proc myfunc(x:int) {
writeln(x+1);
}
proc apply(f, y) {
f(y);
}
apply(myfunc, 42);
So easy. I feel like a goose.
See: https://chapel-lang.org/docs/latest/technotes/firstClassFns.html
I had read that section but my brain failed to extrapolate to simply pass
the name for my case. Brain fade. I was looking for some explanation that
had some function prototype definition. The Chapel way is more like the
Python way. Nice.
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers