Iteratee from Rúnar's blog post