Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 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 done.*/
/*──────────────────────────────────subroutines─────────────────────────*/
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 done.*/
/*──────────────────────────────────ADD subroutine──────────────────────*/
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 subroutine─────────────────────*/
add2: procedure; return add(arg(1), 2)