Higher-order functions: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: restructured subroutines (order, added whitespace), changed name of the called subroutine, showed another version of calling. -- ~~~~)
m (→‎{{header|REXX}}: added more whitespace in the '''output''' section (for the SAY). -- ~~~~)
Line 1,642:
someFunk: procedure; arg ?,n; signal value (?); say result 'result'; return
square: return n**2
tell: say right(funcName'('q") = ",20) result; return
 
fib: if n==0 | n==1 then return n; _=0; a=0; b=1
Line 1,648:
'''output'''
<pre style="overflow:scroll">
fib(10) = 55
fact(6) = 720
square(13) = 169
cube(3) = 27
reverse(721) = 127
──────────────────────────────
done as DEADBEEF.