First-class functions: Difference between revisions

Added Ela
(Added Ela)
Line 557:
 
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|Ela}}==
 
Translation of Haskell:
 
<lang ela>open number //sin,cos,asin,acos
open list //zipWith
 
cube x = x ** 3
croot x = x ** (1/3)
 
funclist = [sin, cos, cube]
funclisti = [asin, acos, croot]
 
zipWith (\f inversef -> (inversef << f) 0.5) funclist funclisti</lang>
 
=={{header|F_Sharp|F#}}==
Anonymous user