Jump to content

First-class functions/Use numbers analogously: Difference between revisions

no 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}}==
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.