Note-to-self: I hope eventually we can make use of streams here -- pipelines like these should be easy to express.