First-class functions/Use numbers analogously: Difference between revisions
First-class functions/Use numbers analogously (view source)
Revision as of 17:54, 19 April 2016
, 8 years ago→{{header|Oforth}}
(→{{header|Groovy}}: new solution) |
|||
Line 799:
=={{header|Oforth}}==
<lang Oforth>
| x xi y yi z zi |
2.0 ->x
0.5 ->xi
Line 811 ⟶ 809:
x y + ->z
x y + inv ->zi
[ x, y, z ] [ xi, yi, zi ] zipWith(#multiplier) map(#[ 0.5 swap perform ] )
{{out}}
<pre>
|