abstract class Nat extends AnyRef
Natural numbers for indexing in HLists.
All type-level computations are done with Church Numerals.
Value-level computations at run-time are done directly on the underlying
Int
values, similar to java.lang.Integer
.
- Source
- Nat.scala
- Alphabetic
- By Inheritance
- Nat
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Nat()
Type Members
- abstract type *[_ <: Nat] <: Nat
Multiply another Nat with this one.
- abstract type +[_ <: Nat] <: Nat
Add another Nat to this one.
- type ++ = Succ[Self]
Increment this Nat.
- abstract type Flip_^[_ <: Nat] <: Nat
- abstract type Fold[U, F[_ <: U] <: U, Z <: U] <: U
The type of a folding operation on this Nat.
- abstract type Self <: Nat
The type of this Nat object.
- type ^[T <: Nat] = ^.T.Flip_^[Self]
Raise this Nat to the exponent given by another Nat.
- type _0 = Self.*[_10]
Multiply this Nat by 10.
- type _1 = *.+[Nat._1]
Multiply this Nat by 10, then add 1.
- type _2 = *.+[Nat._2]
Multiply this Nat by 10, then add 2.
- type _3 = *.+[Nat._3]
Multiply this Nat by 10, then add 3.
- type _4 = *.+[Nat._4]
Multiply this Nat by 10, then add 4.
- type _5 = *.+[Nat._5]
Multiply this Nat by 10, then add 5.
- type _6 = *.+[Nat._6]
Multiply this Nat by 10, then add 6.
- type _7 = *.+[Nat._7]
Multiply this Nat by 10, then add 7.
- type _8 = *.+[Nat._8]
Multiply this Nat by 10, then add 8.
- type _9 = *.+[Nat._9]
Multiply this Nat by 10, then add 9.
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def *[T <: Nat](n: T): *[T]
Multiply another Nat with this one.
- def +[T <: Nat](n: T): +[T]
Add another Nat to this one.
- def ++: ++
Increment this Nat.
- def ->[B](y: B): (Nat, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ^[T <: Nat](n: T): ^[T]
Raise this Nat to the exponent given by another Nat.
- def _0: _0
Multiply this Nat by 10.
- def _1: _1
Multiply this Nat by 10, then add 1.
- def _2: _2
Multiply this Nat by 10, then add 2.
- def _3: _3
Multiply this Nat by 10, then add 3.
- def _4: _4
Multiply this Nat by 10, then add 4.
- def _5: _5
Multiply this Nat by 10, then add 5.
- def _6: _6
Multiply this Nat by 10, then add 6.
- def _7: _7
Multiply this Nat by 10, then add 7.
- def _8: _8
Multiply this Nat by 10, then add 8.
- def _9: _9
Multiply this Nat by 10, then add 9.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def ensuring(cond: (Nat) => Boolean, msg: => Any): Nat
- def ensuring(cond: (Nat) => Boolean): Nat
- def ensuring(cond: Boolean, msg: => Any): Nat
- def ensuring(cond: Boolean): Nat
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(o: Any): Boolean
- Definition Classes
- Nat → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- Nat → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Nat → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from Nat toany2stringadd[Nat] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(nat: any2stringadd[Nat]).+(other)
- Definition Classes
- any2stringadd
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Nat toStringFormat[Nat] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Nat, B)
- Implicit
- This member is added by an implicit conversion from Nat toArrowAssoc[Nat] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
edit this text on github
Scala Language-Integrated Connection Kit
This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.
Further documentation for Slick can be found on the documentation pages.
To the slick package list...