chain

package
v1.0.151 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind added in v1.0.107

func Bind[S1, S2, B, HKTS1, HKTS2, HKTB any](
	mchain func(func(S1) HKTS2) func(HKTS1) HKTS2,
	mmap func(func(B) S2) func(HKTB) HKTS2,
	key func(B) func(S1) S2,
	f func(S1) HKTB,
) func(HKTS1) HKTS2

func BindTo added in v1.0.107

func BindTo[S1, B, HKTS1, HKTB any](
	mmap func(func(B) S1) func(HKTB) HKTS1,
	key func(B) S1,
) func(fa HKTB) HKTS1

func Chain

func Chain[A, B, HKTA, HKTB any](
	mchain func(func(A) HKTB) func(HKTA) HKTB,
	f func(A) HKTB,
) func(HKTA) HKTB

func ChainFirst

func ChainFirst[A, B, HKTA, HKTB any](
	mchain func(func(A) HKTA) func(HKTA) HKTA,
	mmap func(func(B) A) func(HKTB) HKTA,
	f func(A) HKTB) func(HKTA) HKTA

HKTA=HKT[A] HKTB=HKT[B]

func MonadBind added in v1.0.107

func MonadBind[S1, S2, B, HKTS1, HKTS2, HKTB any](
	mchain func(HKTS1, func(S1) HKTS2) HKTS2,
	mmap func(HKTB, func(B) S2) HKTS2,
	first HKTS1,
	key func(B) func(S1) S2,
	f func(S1) HKTB,
) HKTS2

func MonadBindTo added in v1.0.107

func MonadBindTo[S1, B, HKTS1, HKTB any](
	mmap func(HKTB, func(B) S1) HKTS1,
	first HKTB,
	key func(B) S1,
) HKTS1

func MonadChain

func MonadChain[A, B, HKTA, HKTB any](
	mchain func(HKTA, func(A) HKTB) HKTB,
	first HKTA,
	f func(A) HKTB,
) HKTB

func MonadChainFirst

func MonadChainFirst[A, B, HKTA, HKTB any](
	mchain func(HKTA, func(A) HKTA) HKTA,
	mmap func(HKTB, func(B) A) HKTA,
	first HKTA,
	f func(A) HKTB,
) HKTA

HKTA=HKT[A] HKTB=HKT[B]

func ToApply added in v1.0.127

func ToApply[A, B, HKTA, HKTB, HKTFAB any](ap Chainable[A, B, HKTA, HKTB, HKTFAB]) apply.Apply[A, B, HKTA, HKTB, HKTFAB]

ToApply converts from Chainable to functor.Functor

func ToFunctor added in v1.0.127

func ToFunctor[A, B, HKTA, HKTB, HKTFAB any](ap Chainable[A, B, HKTA, HKTB, HKTFAB]) functor.Functor[A, B, HKTA, HKTB]

ToFunctor converts from Chainable to functor.Functor

Types

type Chainable added in v1.0.113

type Chainable[A, B, HKTA, HKTB, HKTFAB any] interface {
	apply.Apply[A, B, HKTA, HKTB, HKTFAB]
	Chain(func(A) HKTB) func(HKTA) HKTB
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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