flatten

Depth-first flatten, useful for a flat outline list.