[Omake] variable capture in anonymous functions

Christopher L Conway cconway at cs.nyu.edu
Tue Mar 4 20:15:39 PST 2008


I'm seeing variable bindings from the surrounding scope override
parameter bindings in anonymous functions. Is there something I am
missing about the scoping rules?

$ cat Omakefile
X = zanzi

apply($(fun X, $(println $(X)bar)), foo)
apply($(fun Y, $(println $(Y)bar)), foo)

$ omake
make[0]: Entering directory `/media/sda6/src/tests/omake/omake.8'
*** omake: reading OMakefiles
zanzibar
foobar
*** omake: finished reading OMakefiles (0.02 sec)
*** omake: done (0.02 sec, 0/0 scans, 0/0 rules, 0/33 digests)
$ omake --version
OMake 0.9.8.5 (release 2):
	build [Wed Aug 8 09:10:36 2007]
	on wagstaff

Default library directory : /home/chris/tools/lib/omake

Thanks,
Chris


More information about the Omake mailing list