First-class functions/Use numbers analogously: Difference between revisions
First-class functions/Use numbers analogously (view source)
Revision as of 21:01, 27 August 2009
, 14 years agono edit summary
(CL code is now closer to the first class functions entry, and both appear for comparison) |
No edit summary |
||
Line 103:
Note: <code>def g := reverse[i]</code> is needed here because E as yet has no defined protocol for iterating over collections in parallel. [http://wiki.erights.org/wiki/Parallel_iteration Page for this issue.]
=={{header|J}}==
This seems to satisfy the current problem statement:
multiplier=: conjunction def 'm * n * ]'
2 multiplier 0.5 (4)
4
0.5 multiplier 4 (0.25)
0.5
4 multiplier 0.25 (2+4)
6
0.25 multiplier (2+4) (1%2+4)
0.25
(2+4) multiplier (1%2+4) 2
2
=={{header|OCaml}}==
|