seq

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Construction

type Construction[F_, A any] interface {
	New(...A) F_
	Cons(A, F_) F_
}

type Foldable

type Foldable[F_, A any] struct{ Seq[F_, A] }

Foldable Sequence

func (Foldable[F_, A]) Fold

func (f Foldable[F_, A]) Fold(m monoid.Monoid[A], seq F_) A

Fold sequence with Monoid

type Kind

type Kind[A any] pure.HKT[Type, A]

Higher-Kinded Sequence type

type Query

type Query[F_, A any] interface {
	Length(F_) int
	IsEmpty(F_) bool
}

type Seq

type Seq[F_, A any] interface {
	Construction[F_, A]
	View[F_, A]
	Query[F_, A]
}

type Type

type Type any

Type is opaque type to define polymorphic context of Seq. It makes HKT typesafe in the context of sequence trait

type View

type View[F_, A any] interface {
	Head(F_) A
	Tail(F_) F_
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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