in src/main/scala/com/gu/flexible/snapshotter/model/Attempt.scala [23:30]
def foreach(f: A => Unit)(implicit ec: ExecutionContext): Unit = map(f)
def recoverWith(fn: AttemptErrors => Attempt[A])(implicit ec: ExecutionContext): Attempt[A] = Attempt {
asFuture.flatMap {
case Left(errors) => fn(errors).asFuture
case other => Future.successful(other)
}
}