Changed API: deprecated do_all (which takes a routine that may lose its result), introduce for_each (which takes a procedure!)
Also fixed a void reference bug introduced in the previous commit