in reply to Recursive to Iterative using Closures (Fun with Fibonacci)
What is?
Im afraid I dont grok the relevence of closures as iterators to convert recursive routines to iterative ones. But to answer your question a typical example where converting recursive routines to iterative is requie is to implement Firstkey/Nextkey in a hash that ties to a tree-like structure.
Simply implementing the classic inorder() function of binary trees iteratively is a good learning example.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Recursive to Iterative using Closures (Fun with Fibonacci)
by Limbic~Region (Chancellor) on Sep 12, 2003 at 13:13 UTC | |
by Abigail-II (Bishop) on Sep 12, 2003 at 14:33 UTC |