Function definition: Difference between revisions

Undo revision 121732 by Wham Bam Rock II Not a function with the required name.
(Undo revision 121732 by Wham Bam Rock II Not a function with the required name.)
Line 1,042:
=={{header|Ruby}}==
<lang ruby>def multiply(a, b)
a * b
end</lang>
 
#_Or...
nthroot = proc do |n, input|
input ** (1/n)
end
 
nthroot.call(8, 100000000) #_=> 10
</lang>
 
=={{header|Sather}}==
Anonymous user