Incidently, a long (as in over 30 years!) time ago I postulated the
addition of a new reserved word "proc" to Icon specifically to implement
anonymous functions. This would have been used exactly as
you want [I think]:
worker(10,20,proc(x) {x*x})
which would function *roughly* the same as:
worker(10,20,proc)
...
procedure proc(x)
return x*x
end
(The major difference being the use of the same scoping rules
found in co-expression definition.)
In the end I left it out because Icon had enough syntactic
verbage and adding more code in the environment of the
day (64KB address spaces!) wasn't appealing when
co-expressions could give you something similar with no
additional language implementation required.
--
Steve Wampler -- [email protected]
The gods that smiled on your birth are now laughing out loud.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group