Anonymous recursion: Difference between revisions
Content added Content deleted
(Added Java implementation) |
|||
Line 883: | Line 883: | ||
- : int option = Some 34</pre> |
- : int option = Some 34</pre> |
||
=={{header|OxygenBasic}}== |
|||
An inner Function keeps the name-space clean: |
|||
<lang oxygenbasic> |
|||
function FiboRatio() as double |
|||
' |
|||
function fibo(double i,j) as double |
|||
if j>2e12 then return j/i |
|||
return fibo j,i+j |
|||
end function |
|||
' |
|||
return fibo 1,1 |
|||
' |
|||
end function |
|||
print FiboRatio |
|||
</lang> |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
{{trans|PicoLisp}} |
{{trans|PicoLisp}} |