multiless

package module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: MPL-2.0 Imports: 1 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Computation

type Computation struct {
	// contains filtered or unexported fields
}

A helper for long chains of "less-than" comparisons, where later comparisons are only required if earlier ones haven't resolved the comparison.

func EagerOrdered

func EagerOrdered[T constraints.Ordered](start Computation, l, r T) Computation

Applies builtin ordering if necessary. Not a method on Computation because methods can't introduce new type parameters.

func New

func New() Computation

func (Computation) AndThen

func (me Computation) AndThen(then Computation) Computation

func (Computation) Bool

func (me Computation) Bool(l, r bool) Computation

Sorts so that false comes before true.

func (Computation) Cmp

func (me Computation) Cmp(i int) Computation

func (Computation) CmpInt64

func (me Computation) CmpInt64(i int64) Computation

func (Computation) EagerSameLess

func (me Computation) EagerSameLess(same, less bool) Computation

func (Computation) Float64

func (me Computation) Float64(l, r float64) Computation

func (Computation) Int

func (me Computation) Int(l, r int) Computation

func (Computation) Int64

func (me Computation) Int64(l, r int64) Computation

func (Computation) Lazy

func (me Computation) Lazy(f func() Computation) Computation

func (Computation) LazySameLess

func (me Computation) LazySameLess(lazy func() (same, less bool)) Computation

func (Computation) Less

func (me Computation) Less() bool

func (Computation) LessOk

func (me Computation) LessOk() (less, ok bool)

func (Computation) MustLess

func (me Computation) MustLess() bool

func (Computation) Ok

func (me Computation) Ok() bool

func (Computation) OrderingInt

func (me Computation) OrderingInt() int

Returns -1 if less, 0 if equal, and 1 if greater than

func (Computation) Uint32

func (me Computation) Uint32(l, r uint32) Computation

func (Computation) Uint64

func (me Computation) Uint64(l, r uint64) Computation

func (Computation) Uintptr

func (me Computation) Uintptr(l, r uintptr) Computation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL