Talk:Anonymous recursion: Difference between revisions
Content added Content deleted
(→Recursion implies a function: If the Ruby version matters, say so properly!) |
|||
Line 195: | Line 195: | ||
* Ruby is different from PicoLisp here: the first pass through the 'recur' block really is a function call! For example, <tt>recur { recurse }</tt> would be an infinite loop (until I run out of memory, with a very long stack trace), but <tt>recur { next 5; recurse }</tt> would return 5, because 'next' is the Ruby keyword to return from a block. |
* Ruby is different from PicoLisp here: the first pass through the 'recur' block really is a function call! For example, <tt>recur { recurse }</tt> would be an infinite loop (until I run out of memory, with a very long stack trace), but <tt>recur { next 5; recurse }</tt> would return 5, because 'next' is the Ruby keyword to return from a block. |
||
* I cannot find the difference between an ''invisible function'' and a ''function-that-is-not-considered-a-function''. If the wrong solutions use the invisible functions, and the correct solutions use the functions that are not considered functions, then I cannot know whether each solution is correct or wrong! --[[User:Kernigh|Kernigh]] 04:04, 11 February 2011 (UTC) |
* I cannot find the difference between an ''invisible function'' and a ''function-that-is-not-considered-a-function''. If the wrong solutions use the invisible functions, and the correct solutions use the functions that are not considered functions, then I cannot know whether each solution is correct or wrong! --[[User:Kernigh|Kernigh]] 04:04, 11 February 2011 (UTC) |
||
== Clarity needed - Confusion between task and examples == |
|||
: While some of this stuff, including article on WP which are marked needing expert help, aren't the easiest to understand, it seems that a number of the examples are probably/maybe incorrect (I don't claim to understand all the solutions). |
|||
:# [[wp:Fixed_point_combinator]] |
|||
:# [[wp:Anonymous_function]] |
|||
:Examples that look like simple recursion no hidden function, no function not bound to an identifier (per #2).: |
|||
:* AutoHotkey, Forth |
|||
:Forth is already marked incorrect. I think AutoHotKey should be too. |
|||
:Examples with nested functions (do these really qualify, maybe but not sure): |
|||
:* Ada, C, C++, Common Lisp, F# (one example), Factor, Nemerle, Unix shell |
|||
:Nested functions and binding to a local variable seem equivalent on one level, so maybe nested functions are fine. |
|||
:--[[User:Dgamey|Dgamey]] 22:01, 20 July 2011 (UTC) |