[–] jimfl 16y ago ↗ That implementation had no exit conditions on the recursion, so after the child fell asleep, my computer went to sleep. [–] slmbrhrt 16y ago ↗ It appears that the exit condition is that you're a little weasel, or your mom finishes the story.Clearly, the original mom could have optimized by telling a story about a little weasel that couldn't get to sleep.
[–] slmbrhrt 16y ago ↗ It appears that the exit condition is that you're a little weasel, or your mom finishes the story.Clearly, the original mom could have optimized by telling a story about a little weasel that couldn't get to sleep.
[–] Gonsalu 16y ago ↗ ... except that's not recursion. [–] metellus 16y ago ↗ No, but it does a good job of explaining the "flow" of a recursive function. It's like doing a manual trace of factorial(4) without needing to know about coding.
[–] metellus 16y ago ↗ No, but it does a good job of explaining the "flow" of a recursive function. It's like doing a manual trace of factorial(4) without needing to know about coding.
4 comments
[ 3.1 ms ] story [ 20.2 ms ] threadClearly, the original mom could have optimized by telling a story about a little weasel that couldn't get to sleep.