map

fun <A, B> Program<A>.map(f: (A) -> B): Program<B>(source)

Transform this program's final value with f. Like flatMap, f runs immediately on a Program.Done value and during interpretation otherwise.