Utilities for Scala continuations