HasZero

com.phasmidsoftware.gryphon.util.HasZero
See theHasZero companion object
trait HasZero[T]

Trait to define a type class which supports the zero (identity) method.

It's rather disappointing that Scala doesn't define this. I suppose we could get it from Cats but that seems like overkill.

Type parameters

T

the type of this trait.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object HasZeroDouble
trait HasZeroInt
object HasZeroInt
trait HasZeroUnit
object HasZeroUnit
Show all

Members list

Value members

Abstract methods

def zero: T