[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[misc] recursion

"Stress the call stack"
| dive max |
max := 1000.

diveTo := [:depth|
    self print: 'diving level ',depth.
    depth < max ifTrue: [
        diveTo value: depth + 1
    ].
].

diveTo value: 1.