Closed flofriday closed 1 year ago
This code segfaults on my machine.
func recTill(n: Int) { if n <= 0 { return } recTill(n-1) } recTill(10000)
So, I don't quite know why it does this, if this just how Swift handles recursion? I didn't even know Swift code can segfault, thats just such an ungraceful way.
I don't think we can solve this, all I could find on the internet is that this is just how stackoverflows are handled.
This code segfaults on my machine.
So, I don't quite know why it does this, if this just how Swift handles recursion? I didn't even know Swift code can segfault, thats just such an ungraceful way.