Const

final case class Const[A, B](getConst: A)

Const is a phantom type, it does not contain a value of its second type parameter B Const can be seen as a type level version of Function.const[A, B]: A => B => A

Companion:
object
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def ===(that: Const[A, B])(implicit A: Eq[A]): Boolean
def combine(that: Const[A, B])(implicit A: Semigroup[A]): Const[A, B]
def compare(that: Const[A, B])(implicit A: Order[A]): Int
def partialCompare(that: Const[A, B])(implicit A: PartialOrder[A]): Double
def retag[C]: Const[A, C]

changes the type of the second type parameter

changes the type of the second type parameter

def show(implicit A: Show[A]): String
def traverse[F[_], C](f: B => F[C])(implicit F: Applicative[F]): F[Const[A, C]]

Inherited methods

Inherited from:
Product