http://qs1969.pair.com?node_id=11146363


in reply to Re: Newbie question
in thread Newbie question

Don't push when you can print.

I'm sorry, this is not good advice. It creates a "strong coupling" between the logic of the algorithm and the interface/caller. It may be that you decide later that you want to send the results somewhere else, or do further processing on them before outputting. Do you really want to dive into the algorithm and find all the print statements? You'll just be converting them to push'es anyway. Better advice is to have your algorithm build its results in a data structure; have a separate routine for outputting that data.