Reform common::prime using new Iterator protocol