> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/f/find_limit_of_recursion.md).

# Find limit of recursion

Maximum recursion depth is memory dependent.

```ruby
func recurse(n) {
   say n
   recurse(n+1)
}
 
recurse(0)
```

#### Output:

```
0
1
2
...
...
357077
357078
357079
```
