boolean

package
v1.0.145 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MonoidAny is the boolean [M.Monoid] under disjunction
	MonoidAny = M.MakeMonoid(
		func(l, r bool) bool {
			return l || r
		},
		false,
	)

	// MonoidAll is the boolean [M.Monoid] under conjuction
	MonoidAll = M.MakeMonoid(
		func(l, r bool) bool {
			return l && r
		},
		true,
	)

	// Eq is the equals predicate for boolean
	Eq = EQ.FromStrictEquals[bool]()

	// Ord is the strict ordering for boolean
	Ord = O.MakeOrd(func(l, r bool) int {
		if l {
			if r {
				return 0
			}
			return +1
		}
		if r {
			return -1
		}
		return 0
	}, func(l, r bool) bool {
		return l == r
	})
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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