4 ms·
> Real world recursion: "Lather, rinse, repeat." I think that's iteration… Interestingly, while trying to think of real-life examples of things that were eith
by wtbob 12y ago
> Real world recursion: "Lather, rinse, repeat."
I think that's iteration…
Interestingly, while trying to think of real-life examples of things that were either iteration or recursion but not both, I realised that any example of one could be considered an example of the other. I'd already known & been comfortable knowing that they are equivalent, but now I understand it in a way I didn't before.
- Kurtz79 12y agoThat's interesting, I also thought that naturally "Lather, rinse, repeat" is iteration, but it really can be "written" either way. On the other hand I think the grammar of a language is a perfect fit for a recursive model, as the op says.
- asgard1024 12y agoI thought about it too. Most biological systems that grow are examples of recursion (like trees). Most human manufacturing systems are examples of iteration (production line, building with a crane floor by floor).