sealed abstract
class
WithFallback[A, B] extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
def
fold[C](f: (A) ⇒ C, g: (B) ⇒ C): C
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
withFallback[C](f: (B) ⇒ C): Option[C]
Allows for typeclasses to be requested, but for fallbacks to be used if the preferred typeclass isn't available. For example, if you'd prefer a
Group
because the algorithm will run faster, but can make do with aMonoid
you could use an implicit likeimplicit ev: Group[A] WithFallback Monoid[A]
.