Find limit of recursion: Difference between revisions
m
→{{header|Factor}}: I really need to use dynamic variables more often
m (→{{header|Factor}}: make better use of depth) |
m (→{{header|Factor}}: I really need to use dynamic variables more often) |
||
Line 804:
The following non-tail recursive word caused a call stack overflow error after 65518 recursive calls in the listener.
<lang factor>SYMBOL: depth
: fn ( n -- n ) depth inc 1 + fn 1 + ;
|