Talk:Anonymous recursion: Difference between revisions

Add to the correctness discussion
(Add to the correctness discussion)
Line 1:
== What constitutes correctness in this task ==
 
It seems that I could not make clear what this task is about. Anonymous recursion is the '''call''' equivalent to the '''jump''' of an anonymous branch.
 
Line 118 ⟶ 120:
 
:::The J solution does indeed check if the number is negative before using recursion, and will not use recursion with a negative argument. (Any number which is negative is not greater than 1, and the J solution checks to see if the number is greater than 1 before using recursion.) That said, the task does not specify the result to be returned for negative values. --[[User:Rdm|Rdm]] 03:25, 9 January 2011 (UTC)
 
:The Tcl version only gives the function a ''local'' name (i.e., stores the function in a local variable) in order to keep the lines relatively short. <code>f</code> is not a name in the space of commands (which Tcl partitions completely from the space of variables) so I'd argue that the code as written completely follows the rules of the task. It would certainly be understood as being anonymous from the perspective of a Tcl practitioner. –[[User:Dkf|Donal Fellows]] 09:06, 9 January 2011 (UTC)
 
== Recursion implies a function ==
Anonymous user