toy coroutines for scala