phldavies
03/18/2022, 12:24 PMfetch(key).flatMap { Either.catch({ Malformed(key) }) { f(it) } }
simon.vergauwen
03/18/2022, 2:45 PMflatMap
with either block.
either {
val res = fetch(key).bind()
Either.catch { Malformed(key) }
.mapLeft(f).bind()
}