Enum

trait Enum[F] extends Order[F]

An scalaz.Orderable with discrete values.

Companion
object
trait Order[F]
trait Equal[F]
class Object
trait Matchable
class Any
Enum[F]

Type members

Classlikes

trait EnumLaw extends OrderLaw

Inherited classlikes

trait EqualLaw
Inherited from
Equal
trait OrderLaw
Inherited from
Order

Value members

Abstract methods

def pred(a: F): F
def succ(a: F): F

Concrete methods

def from(a: F): EphemeralStream[F]
def fromStep(n: Int, a: F): EphemeralStream[F]
def fromStepTo(n: Int, a: F, z: F): EphemeralStream[F]
def fromStepToL(n: Int, a: F, z: F): IList[F]
def fromTo(a: F, z: F): EphemeralStream[F]
def fromToL(a: F, z: F): IList[F]
def max: Option[F]
def min: Option[F]
def predState[X](f: F => X): State[F, X]

Produce a state value that executes the predecessor (pred) on each spin and executing the given function on the current value. This is useful to implement decremental looping. Evaluating the state value requires a beginning to decrement from.

Produce a state value that executes the predecessor (pred) on each spin and executing the given function on the current value. This is useful to implement decremental looping. Evaluating the state value requires a beginning to decrement from.

Value Params
f

The function to execute on each spin of the state value.

def predStateMax[X, Y](f: F => X, k: X => Y): Option[Y]

Produce a value that starts at the maximum (if it exists) and decrements through a state value with the given mapping function. This is useful to implement decremental looping.

Produce a value that starts at the maximum (if it exists) and decrements through a state value with the given mapping function. This is useful to implement decremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The mapping function.

def predStateMaxM[X, Y](f: F => X, k: X => State[F, Y]): Option[Y]

Produce a value that starts at the maximum (if it exists) and decrements through a state value with the given binding function. This is useful to implement decremental looping.

Produce a value that starts at the maximum (if it exists) and decrements through a state value with the given binding function. This is useful to implement decremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The binding function.

def predStateZero[X, Y](f: F => X, k: X => Y)(implicit m: Monoid[F]): Y

Produce a value that starts at zero (Monoid.zero) and decrements through a state value with the given mapping function. This is useful to implement decremental looping.

Produce a value that starts at zero (Monoid.zero) and decrements through a state value with the given mapping function. This is useful to implement decremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The mapping function.

m

The implementation of the zero function from which to start.

def predStateZeroM[X, Y](f: F => X, k: X => State[F, Y])(implicit m: Monoid[F]): Y

Produce a value that starts at zero (Monoid.zero) and decrements through a state value with the given binding function. This is useful to implement decremental looping.

Produce a value that starts at zero (Monoid.zero) and decrements through a state value with the given binding function. This is useful to implement decremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The binding function.

m

The implementation of the zero function from which to start.

def predn(n: Int, a: F): F
def predx: Kleisli[Option, F, F]

Moves to the predecessor, unless at the minimum.

Moves to the predecessor, unless at the minimum.

def succState[X](f: F => X): State[F, X]

Produce a state value that executes the successor (succ) on each spin and executing the given function on the current value. This is useful to implement incremental looping. Evaluating the state value requires a beginning to increment from.

Produce a state value that executes the successor (succ) on each spin and executing the given function on the current value. This is useful to implement incremental looping. Evaluating the state value requires a beginning to increment from.

Value Params
f

The function to execute on each spin of the state value.

def succStateMin[X, Y](f: F => X, k: X => Y): Option[Y]

Produce a value that starts at the minimum (if it exists) and increments through a state value with the given mapping function. This is useful to implement incremental looping.

Produce a value that starts at the minimum (if it exists) and increments through a state value with the given mapping function. This is useful to implement incremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The mapping function.

def succStateMinM[X, Y](f: F => X, k: X => State[F, Y]): Option[Y]

Produce a value that starts at the minimum (if it exists) and increments through a state value with the given binding function. This is useful to implement incremental looping.

Produce a value that starts at the minimum (if it exists) and increments through a state value with the given binding function. This is useful to implement incremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The binding function.

def succStateZero[X, Y](f: F => X, k: X => Y)(implicit m: Monoid[F]): Y

Produce a value that starts at zero (Monoid.zero) and increments through a state value with the given mapping function. This is useful to implement incremental looping.

Produce a value that starts at zero (Monoid.zero) and increments through a state value with the given mapping function. This is useful to implement incremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The mapping function.

m

The implementation of the zero function from which to start.

def succStateZeroM[X, Y](f: F => X, k: X => State[F, Y])(implicit m: Monoid[F]): Y

Produce a value that starts at zero (Monoid.zero) and increments through a state value with the given binding function. This is useful to implement incremental looping.

Produce a value that starts at zero (Monoid.zero) and increments through a state value with the given binding function. This is useful to implement incremental looping.

Value Params
f

The function to execute on each spin of the state value.

k

The binding function.

m

The implementation of the zero function from which to start.

def succn(n: Int, a: F): F
def succx: Kleisli[Option, F, F]

Moves to the successor, unless at the maximum.

Moves to the successor, unless at the maximum.

Inherited methods

def apply(x: F, y: F): Ordering
Inherited from
Order
override
def contramap[B](f: B => F): Order[B]
Definition Classes
Inherited from
Order
def equal(x: F, y: F): Boolean
Inherited from
Order
def equalIsNatural: Boolean
Returns

true, if equal(f1, f2) is known to be equivalent to f1 == f2

Inherited from
Equal
Inherited from
Equal
def greaterThan(x: F, y: F): Boolean
Inherited from
Order
def greaterThanOrEqual(x: F, y: F): Boolean
Inherited from
Order
def lessThan(x: F, y: F): Boolean
Inherited from
Order
def lessThanOrEqual(x: F, y: F): Boolean
Inherited from
Order
def max(x: F, y: F): F
Inherited from
Order
def min(x: F, y: F): F
Inherited from
Order
def order(x: F, y: F): Ordering
Inherited from
Order
Inherited from
Order
Inherited from
Order
def sort(x: F, y: F): (F, F)
Inherited from
Order
def toScalaOrdering: Ordering[F]
Note

Order.fromScalaOrdering(toScalaOrdering).order(x, y) = this.order(x, y)

Inherited from
Order

Concrete fields

Inherited fields

Inherited from
Equal
Inherited from
Order