I tried to implement my own custom iteration by recursion but I got stuck in the combination of IO and list monads.