bug icon indicating copy to clipboard operation
bug copied to clipboard

Add "map" to Catcher

Open scabug opened this issue 12 years ago • 2 comments

scala.util.Exception.Catch is obviously a functor, but it's missing the corresponding map implementation:

def map[S](f: T => S): Catch[S] =
  new Catch(this.pf andThen f, this.fin, this.rethrow);

This is useful when we want to keep the logic (exception handling/finalizers) but we need a different result value.

scabug avatar Mar 05 '13 19:03 scabug

Imported From: https://issues.scala-lang.org/browse/SI-7220?orig=1 Reporter: Petr Pudlak (petrp) Affected Versions: 2.9.1

scabug avatar Mar 05 '13 19:03 scabug

Petr Pudlak (petrp) said: PS: I wanted to give this a low priority, but the system doesn't allow me to edit the field and keeps "Blocker" there.

scabug avatar Mar 05 '13 19:03 scabug