IO monad and lazy evaluation