Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,7 @@
/*REXX program demonstrates a REXX currying method to perform addition. */
say 'add 2 to 3: ' add(2, 3)
say 'add 2 to 3 (curried):' add2(3)
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
add: procedure; $= arg(1); do j=2 to arg(); $= $ + arg(j); end; return $
add2: procedure; return add( arg(1), 2)

View file

@ -0,0 +1,12 @@
/*REXX program demonstrates a REXX currying method to perform addition. */
say 'add 2 to 3: ' add(2, 3)
say 'add 2 to 3 (curried):' add2(3)
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
add: procedure; $= 0; do j=1 for arg()
do k=1 for words( arg(j) ); $= $ + word( arg(j), k)
end /*k*/
end /*j*/
return $
/*──────────────────────────────────────────────────────────────────────────────────────*/
add2: procedure; return add( arg(1), 2)