From: Agnot Tok Date: 2001-01-23T00:08:04+09:00 Subject: [ruby-talk:9716] Name of iterators for trees? Hi, Iterators is a nice concept and I'm trying to apply the idea to trees. However, I'm not sure how to name things. Should "each" be a depth-first, reversed-depth-first or even a breadth-first iterator? Should it be parameterized so that the user can specify the node-visiting order? Anyone seen any work/a good design on/for this? Whats a "natural" naming? my_tree.each(:DEPTH_FIRST) {|node| ...} or my_tree.each_node_depth_first {|node| ...} Regards, Agnot _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.