generic

package
v1.0.130 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SequencePair

func SequencePair[
	MAP ~func(func(T1) func(T2) P.Pair[T1, T2]) func(HKT_T1) HKT_F_T2,
	AP1 ~func(HKT_T2) func(HKT_F_T2) HKT_PAIR,
	T1,
	T2,
	HKT_T1,
	HKT_T2,
	HKT_F_T2,
	HKT_PAIR any,
](
	fmap MAP,
	fap1 AP1,
	t P.Pair[HKT_T1, HKT_T2],
) HKT_PAIR

SequencePair is a utility function used to implement the sequence operation for higher kinded types based only on map and ap. The function takes a [Pair] of higher higher kinded types and returns a higher kinded type of a [Pair] with the resolved values.

func TraversePair

func TraversePair[
	MAP ~func(func(T1) func(T2) P.Pair[T1, T2]) func(HKT_T1) HKT_F_T2,
	AP1 ~func(HKT_T2) func(HKT_F_T2) HKT_PAIR,
	F1 ~func(A1) HKT_T1,
	F2 ~func(A2) HKT_T2,
	A1, T1,
	A2, T2,
	HKT_T1,
	HKT_T2,
	HKT_F_T2,
	HKT_PAIR any,
](
	fmap MAP,
	fap1 AP1,
	f1 F1,
	f2 F2,
	t P.Pair[A1, A2],
) HKT_PAIR

TraversePair is a utility function used to implement the sequence operation for higher kinded types based only on map and ap. The function takes a [Pair] of base types and 2 functions that transform these based types into higher higher kinded types. It returns a higher kinded type of a [Pair] with the resolved values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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