Anonymous user
Apply a callback to an array: Difference between revisions
m
→{{header|REXX}}: removed superflous blanks, made REXX code compliant.. -- ~~~~
(Moved the REXX language to it's proper place alphabetically. -- ~~~~) |
m (→{{header|REXX}}: removed superflous blanks, made REXX code compliant.. -- ~~~~) |
||
Line 1,404:
=={{header|REXX}}==
<lang rexx>/*REXX program to apply a callback to an array. */
a.=
a.0= 0
a.1= 1
Line 1,422:
call listab ' after'
exit
/*─────────────────────────────────────BANGIT subroutine────────────────*/
bangit: do j=0
Line 1,428 ⟶ 1,427:
call value arg(2)'.'j,fact(_)
end
/*─────────────────────────────────────FACT subroutine──────────────────*/
fact: procedure; !=1; do j=2 to arg(1); !=!*j; end; return !
/*─────────────────────────────────────LISTAB subroutine────────────────*/
Line 1,441 ⟶ 1,438:
say arg(1) 'b.'j"="b.j
end
return</lang>
'''output'''
<pre style="height:30ex;overflow:scroll">
before a.0=0
|