Jump to content

Talk:Anonymous recursion: Difference between revisions

m
added a query about task description. ~~~~
m (Forgot signature)
m (added a query about task description. ~~~~)
Line 186:
 
:Concerning "recursion implies a function", it depends on what you consider a function. The GOSOB in the Basic code snippet is not really a function call. That's why I used the term "call" instead of "function". A Forth solution would involve two or three new immediate control words, similar to BEGIN/WHILE/REPEAT. In the PicoLisp version (and also in your second Ruby version, if I understand it right), the first pass through the 'recur' body does not actually involve a function call, but it is executed in the context of the surrounding function. --[[User:Abu|Abu]] 07:57, 9 January 2011 (UTC)
 
=== completion of the task ===
 
I am the author of the REXX solution.
 
There is a note which says in part: " .. The task was not to check for a negative argument..."
 
The task as stated:
 
"If possible, ..... which checks for a negative argument before doing the autual recursion."
 
I did the neg arg check before the actual recursion.
 
In the anonymous call ranch example for REXX, "doThat" was a recursive call for the solution,
as well as "doMore", which did likewise.
<br>I can break the REXX code to NOT invoke a recursive call for the solution, but merely delay it, which
would seem to defeat the purpose of the example (by adding more unecessary code).
Was it against the rules to have a different version of the recursive call as part of "doThat"?
[[User:Gerard Schildberger|Gerard Schildberger]] 20:39, 18 January 2011 (UTC)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.