dev checkpoint: making calls return iterators
make resolve_name lazy + convert all other outputfn callbacks to (eager) iterators
fix up main.rs to use iterator