generic

package
v2.3.11 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2025-03-09 23:53:07.5979849 +0100 CET m=+0.009458901

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func After

func After[GA ~func() either.Either[E, A], E, A any](timestamp time.Time) func(GA) GA

After creates an operation that passes after the given time.Time

Deprecated:

func Alt

func Alt[LAZY ~func() GIOA, GIOA ~func() either.Either[E, A], E, A any](second LAZY) func(GIOA) GIOA

Deprecated:

func Ap

func Ap[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](ma GA) func(GAB) GB

Deprecated:

func ApPar

func ApPar[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](ma GA) func(GAB) GB

Deprecated:

func ApSeq

func ApSeq[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](ma GA) func(GAB) GB

Deprecated:

func BiMap

func BiMap[GA ~func() either.Either[E1, A], GB ~func() either.Either[E2, B], E1, E2, A, B any](f func(E1) E2, g func(A) B) func(GA) GB

BiMap maps a pair of functions over the two type arguments of the bifunctor.

Deprecated:

func Chain

func Chain[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](f func(A) GB) func(GA) GB

Deprecated:

func ChainEitherK

func ChainEitherK[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](f func(A) either.Either[E, B]) func(GA) GB

Deprecated:

func ChainFirst

func ChainFirst[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](f func(A) GB) func(GA) GA

ChainFirst runs the monad returned by the function but returns the result of the original monad

Deprecated:

func ChainFirstEitherK

func ChainFirstEitherK[GA ~func() either.Either[E, A], E, A, B any](f func(A) either.Either[E, B]) func(GA) GA

ChainFirstEitherK runs the monad returned by the function but returns the result of the original monad

Deprecated:

func ChainFirstIOK

func ChainFirstIOK[GA ~func() either.Either[E, A], GIOB ~func() B, E, A, B any](f func(A) GIOB) func(GA) GA

ChainFirstIOK runs the monad returned by the function but returns the result of the original monad

Deprecated:

func ChainIOK

func ChainIOK[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], GR ~func() B, E, A, B any](f func(A) GR) func(GA) GB

func ChainOptionK

func ChainOptionK[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](onNone func() E) func(func(A) O.Option[B]) func(GA) GB

func ChainTo

func ChainTo[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](fb GB) func(GA) GB

func Defer

func Defer[GEA ~func() either.Either[E, A], E, A any](gen func() GEA) GEA

Defer creates an IO by creating a brand new IO via a generator function, each time

Deprecated:

func Delay

func Delay[GA ~func() either.Either[E, A], E, A any](delay time.Duration) func(GA) GA

Delay creates an operation that passes in the value after some time.Duration

Deprecated:

func Eitherize0

func Eitherize0[GIOA ~func() ET.Either[error, R], F ~func() (R, error), R any](f F) func() GIOA

Eitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning a [GIOA]

func Eitherize1

func Eitherize1[GIOA ~func() ET.Either[error, R], F ~func(T1) (R, error), T1, R any](f F) func(T1) GIOA

Eitherize1 converts a function with 1 parameters returning a tuple into a function with 1 parameters returning a [GIOA]

func Eitherize2

func Eitherize2[GIOA ~func() ET.Either[error, R], F ~func(T1, T2) (R, error), T1, T2, R any](f F) func(T1, T2) GIOA

Eitherize2 converts a function with 2 parameters returning a tuple into a function with 2 parameters returning a [GIOA]

func Eitherize3

func Eitherize3[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3) (R, error), T1, T2, T3, R any](f F) func(T1, T2, T3) GIOA

Eitherize3 converts a function with 3 parameters returning a tuple into a function with 3 parameters returning a [GIOA]

func Eitherize4

func Eitherize4[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4) (R, error), T1, T2, T3, T4, R any](f F) func(T1, T2, T3, T4) GIOA

Eitherize4 converts a function with 4 parameters returning a tuple into a function with 4 parameters returning a [GIOA]

func Eitherize5

func Eitherize5[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5) (R, error), T1, T2, T3, T4, T5, R any](f F) func(T1, T2, T3, T4, T5) GIOA

Eitherize5 converts a function with 5 parameters returning a tuple into a function with 5 parameters returning a [GIOA]

func Eitherize6

func Eitherize6[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5, T6) (R, error), T1, T2, T3, T4, T5, T6, R any](f F) func(T1, T2, T3, T4, T5, T6) GIOA

Eitherize6 converts a function with 6 parameters returning a tuple into a function with 6 parameters returning a [GIOA]

func Eitherize7

func Eitherize7[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5, T6, T7) (R, error), T1, T2, T3, T4, T5, T6, T7, R any](f F) func(T1, T2, T3, T4, T5, T6, T7) GIOA

Eitherize7 converts a function with 7 parameters returning a tuple into a function with 7 parameters returning a [GIOA]

func Eitherize8

func Eitherize8[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5, T6, T7, T8) (R, error), T1, T2, T3, T4, T5, T6, T7, T8, R any](f F) func(T1, T2, T3, T4, T5, T6, T7, T8) GIOA

Eitherize8 converts a function with 8 parameters returning a tuple into a function with 8 parameters returning a [GIOA]

func Eitherize9

func Eitherize9[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error), T1, T2, T3, T4, T5, T6, T7, T8, T9, R any](f F) func(T1, T2, T3, T4, T5, T6, T7, T8, T9) GIOA

Eitherize9 converts a function with 9 parameters returning a tuple into a function with 9 parameters returning a [GIOA]

func Eitherize10

func Eitherize10[GIOA ~func() ET.Either[error, R], F ~func(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) (R, error), T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R any](f F) func(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) GIOA

Eitherize10 converts a function with 10 parameters returning a tuple into a function with 10 parameters returning a [GIOA]

func Flap

func Flap[GEAB ~func() either.Either[E, func(A) B], GEB ~func() either.Either[E, B], E, B, A any](a A) func(GEAB) GEB

Deprecated:

func Flatten

func Flatten[GA ~func() either.Either[E, A], GAA ~func() either.Either[E, GA], E, A any](mma GAA) GA

Deprecated:

func Fold

func Fold[GA ~func() either.Either[E, A], GB ~func() B, E, A, B any](onLeft func(E) GB, onRight func(A) GB) func(GA) GB

Fold convers an IOEither into an IO

Deprecated:

func FromEither

func FromEither[GA ~func() either.Either[E, A], E, A any](e either.Either[E, A]) GA

func FromIO

func FromIO[GA ~func() either.Either[E, A], GR ~func() A, E, A any](mr GR) GA

Deprecated:

func FromIOOption

func FromIOOption[GEA ~func() either.Either[E, A], GA ~func() O.Option[A], E, A any](onNone func() E) func(ioo GA) GEA

Deprecated:

func FromImpure

func FromImpure[GA ~func() either.Either[E, any], IMP ~func(), E any](f IMP) GA

FromImpure converts a side effect without a return value into a side effect that returns any

Deprecated:

func FromOption

func FromOption[GA ~func() either.Either[E, A], E, A any](onNone func() E) func(o O.Option[A]) GA

func GetOrElse

func GetOrElse[GA ~func() either.Either[E, A], GB ~func() A, E, A any](onLeft func(E) GB) func(GA) GB

GetOrElse extracts the value or maps the error

func Left

func Left[GA ~func() either.Either[E, A], E, A any](l E) GA

Deprecated:

func LeftIO

func LeftIO[GA ~func() either.Either[E, A], GE ~func() E, E, A any](ml GE) GA

Deprecated:

func MakeIO

func MakeIO[GA ~func() either.Either[E, A], E, A any](f GA) GA

Deprecated:

func Map

func Map[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](f func(A) B) func(GA) GB

Deprecated:

func MapLeft

func MapLeft[GA1 ~func() either.Either[E1, A], GA2 ~func() either.Either[E2, A], E1, E2, A any](f func(E1) E2) func(GA1) GA2

Deprecated:

func MapTo

func MapTo[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](b B) func(GA) GB

Deprecated:

func Memoize

func Memoize[GA ~func() either.Either[E, A], E, A any](ma GA) GA

Memoize computes the value of the provided IO monad lazily but exactly once

Deprecated:

func MonadAlt

func MonadAlt[LAZY ~func() GIOA, GIOA ~func() either.Either[E, A], E, A any](first GIOA, second LAZY) GIOA

Deprecated:

func MonadAp

func MonadAp[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](mab GAB, ma GA) GB

Deprecated:

func MonadApPar

func MonadApPar[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](mab GAB, ma GA) GB

Deprecated:

func MonadApSeq

func MonadApSeq[GB ~func() either.Either[E, B], GAB ~func() either.Either[E, func(A) B], GA ~func() either.Either[E, A], E, A, B any](mab GAB, ma GA) GB

Deprecated:

func MonadBiMap

func MonadBiMap[GA ~func() either.Either[E1, A], GB ~func() either.Either[E2, B], E1, E2, A, B any](fa GA, f func(E1) E2, g func(A) B) GB

Deprecated:

func MonadChain

func MonadChain[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](fa GA, f func(A) GB) GB

Deprecated:

func MonadChainEitherK

func MonadChainEitherK[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](ma GA, f func(A) either.Either[E, B]) GB

Deprecated:

func MonadChainFirst

func MonadChainFirst[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](ma GA, f func(A) GB) GA

MonadChainFirst runs the monad returned by the function but returns the result of the original monad

Deprecated:

func MonadChainFirstEitherK

func MonadChainFirstEitherK[GA ~func() either.Either[E, A], E, A, B any](first GA, f func(A) either.Either[E, B]) GA

MonadChainFirstEitherK runs the monad returned by the function but returns the result of the original monad

Deprecated:

func MonadChainFirstIOK

func MonadChainFirstIOK[GA ~func() either.Either[E, A], GIOB ~func() B, E, A, B any](first GA, f func(A) GIOB) GA

MonadChainFirstIOK runs the monad returned by the function but returns the result of the original monad

Deprecated:

func MonadChainIOK

func MonadChainIOK[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], GR ~func() B, E, A, B any](ma GA, f func(A) GR) GB

Deprecated:

func MonadChainTo

func MonadChainTo[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](fa GA, fb GB) GB

func MonadFlap

func MonadFlap[GEAB ~func() either.Either[E, func(A) B], GEB ~func() either.Either[E, B], E, B, A any](fab GEAB, a A) GEB

Deprecated:

func MonadFold

func MonadFold[GA ~func() either.Either[E, A], GB ~func() B, E, A, B any](ma GA, onLeft func(E) GB, onRight func(A) GB) GB

func MonadMap

func MonadMap[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](fa GA, f func(A) B) GB

Deprecated:

func MonadMapLeft

func MonadMapLeft[GA1 ~func() either.Either[E1, A], GA2 ~func() either.Either[E2, A], E1, E2, A any](fa GA1, f func(E1) E2) GA2

Deprecated:

func MonadMapTo

func MonadMapTo[GA ~func() either.Either[E, A], GB ~func() either.Either[E, B], E, A, B any](fa GA, b B) GB

Deprecated:

func MonadOf

func MonadOf[GA ~func() either.Either[E, A], E, A any](r A) GA

Deprecated:

func Of

func Of[GA ~func() either.Either[E, A], E, A any](r A) GA

Deprecated:

func Right[GA ~func() either.Either[E, A], E, A any](r A) GA

Deprecated:

func RightIO

func RightIO[GA ~func() either.Either[E, A], GR ~func() A, E, A any](mr GR) GA

Deprecated:

func Swap

func Swap[GEA ~func() either.Either[E, A], GAE ~func() either.Either[A, E], E, A any](val GEA) GAE

Swap changes the order of type parameters

Deprecated:

func ToIOOption

func ToIOOption[GA ~func() O.Option[A], GEA ~func() either.Either[E, A], E, A any](ioe GEA) GA

Deprecated:

func TryCatch

func TryCatch[GA ~func() either.Either[E, A], E, A any](f func() (A, error), onThrow func(error) E) GA

Deprecated:

func TryCatchError

func TryCatchError[GA ~func() either.Either[error, A], A any](f func() (A, error)) GA

Deprecated:

func Uneitherize0

func Uneitherize0[GIOA ~func() ET.Either[error, R], GTA ~func() GIOA, R any](f GTA) func() (R, error)

Uneitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning a [GIOA]

func Uneitherize1

func Uneitherize1[GIOA ~func() ET.Either[error, R], GTA ~func(T1) GIOA, T1, R any](f GTA) func(T1) (R, error)

Uneitherize1 converts a function with 1 parameters returning a tuple into a function with 1 parameters returning a [GIOA]

func Uneitherize2

func Uneitherize2[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2) GIOA, T1, T2, R any](f GTA) func(T1, T2) (R, error)

Uneitherize2 converts a function with 2 parameters returning a tuple into a function with 2 parameters returning a [GIOA]

func Uneitherize3

func Uneitherize3[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3) GIOA, T1, T2, T3, R any](f GTA) func(T1, T2, T3) (R, error)

Uneitherize3 converts a function with 3 parameters returning a tuple into a function with 3 parameters returning a [GIOA]

func Uneitherize4

func Uneitherize4[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4) GIOA, T1, T2, T3, T4, R any](f GTA) func(T1, T2, T3, T4) (R, error)

Uneitherize4 converts a function with 4 parameters returning a tuple into a function with 4 parameters returning a [GIOA]

func Uneitherize5

func Uneitherize5[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5) GIOA, T1, T2, T3, T4, T5, R any](f GTA) func(T1, T2, T3, T4, T5) (R, error)

Uneitherize5 converts a function with 5 parameters returning a tuple into a function with 5 parameters returning a [GIOA]

func Uneitherize6

func Uneitherize6[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5, T6) GIOA, T1, T2, T3, T4, T5, T6, R any](f GTA) func(T1, T2, T3, T4, T5, T6) (R, error)

Uneitherize6 converts a function with 6 parameters returning a tuple into a function with 6 parameters returning a [GIOA]

func Uneitherize7

func Uneitherize7[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5, T6, T7) GIOA, T1, T2, T3, T4, T5, T6, T7, R any](f GTA) func(T1, T2, T3, T4, T5, T6, T7) (R, error)

Uneitherize7 converts a function with 7 parameters returning a tuple into a function with 7 parameters returning a [GIOA]

func Uneitherize8

func Uneitherize8[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5, T6, T7, T8) GIOA, T1, T2, T3, T4, T5, T6, T7, T8, R any](f GTA) func(T1, T2, T3, T4, T5, T6, T7, T8) (R, error)

Uneitherize8 converts a function with 8 parameters returning a tuple into a function with 8 parameters returning a [GIOA]

func Uneitherize9

func Uneitherize9[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5, T6, T7, T8, T9) GIOA, T1, T2, T3, T4, T5, T6, T7, T8, T9, R any](f GTA) func(T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error)

Uneitherize9 converts a function with 9 parameters returning a tuple into a function with 9 parameters returning a [GIOA]

func Uneitherize10

func Uneitherize10[GIOA ~func() ET.Either[error, R], GTA ~func(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) GIOA, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, R any](f GTA) func(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) (R, error)

Uneitherize10 converts a function with 10 parameters returning a tuple into a function with 10 parameters returning a [GIOA]

Types

type Either

type Either[E, A any] = either.Either[E, A]

Jump to

Keyboard shortcuts

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