Higher-order functions: Difference between revisions

(→‎{{header|D}}: better example I think)
Line 1,570:
meth = method(:succ)
to2(meth) #=> 3</lang>
 
=={{header|Run BASIC}}==
<lang runbasic>print first(99)
print second(first(99))
 
function first(f)
first = f * 100
end function
function second(s)
second = first(s) * 3
end function</lang>Output:
<pre></pre>
 
=={{header|Scala}}==
Anonymous user