Documentation
¶
Overview ¶
Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2023-09-12 13:44:36.166526 +0200 CEST m=+0.011001401
Index ¶
- func Ap[GA ~func(R) A, GB ~func(R) B, GAB ~func(R) func(A) B, R, A, B any](fa GA) func(GAB) GB
- func Ask[GR ~func(R) R, R any]() GR
- func Asks[GA ~func(R) A, R, A any](f GA) GA
- func AsksReader[GA ~func(R) A, R, A any](f func(R) GA) GA
- func Chain[GA ~func(R) A, GB ~func(R) B, R, A, B any](f func(A) GB) func(GA) GB
- func Compose[AB ~func(A) B, BC ~func(B) C, AC ~func(A) C, A, B, C any](ab AB) func(BC) AC
- func Curry0[GA ~func(R) A, R, A any](f func(R) A) GA
- func Curry1[GA ~func(R) A, R, T1, A any](f func(R, T1) A) func(T1) GA
- func Curry2[GA ~func(R) A, R, T1, T2, A any](f func(R, T1, T2) A) func(T1) func(T2) GA
- func Curry3[GA ~func(R) A, R, T1, T2, T3, A any](f func(R, T1, T2, T3) A) func(T1) func(T2) func(T3) GA
- func Curry4[GA ~func(R) A, R, T1, T2, T3, T4, A any](f func(R, T1, T2, T3, T4) A) func(T1) func(T2) func(T3) func(T4) GA
- func First[GAB ~func(A) B, GABC ~func(T.Tuple2[A, C]) T.Tuple2[B, C], A, B, C any](pab GAB) GABC
- func Flatten[GA ~func(R) A, GGA ~func(R) GA, R, A any](mma GGA) GA
- func From0[GRA ~func(C) R, F ~func(C) R, C, R any](f F) func() GRA
- func From1[GRA ~func(C) R, F ~func(C, T0) R, T0, C, R any](f F) func(T0) GRA
- func From10[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) R, ...](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) GRA
- func From2[GRA ~func(C) R, F ~func(C, T0, T1) R, T0, T1, C, R any](f F) func(T0, T1) GRA
- func From3[GRA ~func(C) R, F ~func(C, T0, T1, T2) R, T0, T1, T2, C, R any](f F) func(T0, T1, T2) GRA
- func From4[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3) R, T0, T1, T2, T3, C, R any](f F) func(T0, T1, T2, T3) GRA
- func From5[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4) R, T0, T1, T2, T3, T4, C, R any](f F) func(T0, T1, T2, T3, T4) GRA
- func From6[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5) R, ...](f F) func(T0, T1, T2, T3, T4, T5) GRA
- func From7[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6) R, ...](f F) func(T0, T1, T2, T3, T4, T5, T6) GRA
- func From8[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) R, ...](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) GRA
- func From9[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) R, ...](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8) GRA
- func Local[GA1 ~func(R1) A, GA2 ~func(R2) A, R2, R1, A any](f func(R2) R1) func(GA1) GA2
- func MakeReader[GA ~func(R) A, R, A any](r GA) GA
- func Map[GA ~func(E) A, GB ~func(E) B, E, A, B any](f func(A) B) func(GA) GB
- func MonadAp[GA ~func(R) A, GB ~func(R) B, GAB ~func(R) func(A) B, R, A, B any](fab GAB, fa GA) GB
- func MonadChain[GA ~func(R) A, GB ~func(R) B, R, A, B any](ma GA, f func(A) GB) GB
- func MonadMap[GA ~func(E) A, GB ~func(E) B, E, A, B any](fa GA, f func(A) B) GB
- func MonadTraverseArray[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](tas AAS, f func(A) GB) GBS
- func Of[GA ~func(R) A, R, A any](a A) GA
- func Promap[GA ~func(E) A, GB ~func(D) B, E, A, D, B any](f func(D) E, g func(A) B) func(GA) GB
- func Read[GA ~func(E) A, E, A any](e E) func(GA) A
- func Second[GBC ~func(B) C, GABC ~func(T.Tuple2[A, B]) T.Tuple2[A, C], A, B, C any](pbc GBC) GABC
- func SequenceArray[GA ~func(R) A, GAS ~func(R) AAS, AAS ~[]A, GAAS ~[]GA, R, A any](ma GAAS) GAS
- func SequenceT1[GA ~func(R) A, GTA ~func(R) T.Tuple1[A], R, A any](a GA) GTA
- func SequenceT2[GA ~func(R) A, GB ~func(R) B, GTAB ~func(R) T.Tuple2[A, B], R, A, B any](a GA, b GB) GTAB
- func SequenceT3[GA ~func(R) A, GB ~func(R) B, GC ~func(R) C, GTABC ~func(R) T.Tuple3[A, B, C], ...](a GA, b GB, c GC) GTABC
- func SequenceT4[GA ~func(R) A, GB ~func(R) B, GC ~func(R) C, GD ~func(R) D, ...](a GA, b GB, c GC, d GD) GTABCD
- func TraverseArray[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](f func(A) GB) func(AAS) GBS
- func TraverseArrayWithIndex[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](f func(int, A) GB) func(AAS) GBS
- func Uncurry0[GA ~func(R) A, R, A any](f GA) func(R) A
- func Uncurry1[GA ~func(R) A, R, T1, A any](f func(T1) GA) func(R, T1) A
- func Uncurry2[GA ~func(R) A, R, T1, T2, A any](f func(T1) func(T2) GA) func(R, T1, T2) A
- func Uncurry3[GA ~func(R) A, R, T1, T2, T3, A any](f func(T1) func(T2) func(T3) GA) func(R, T1, T2, T3) A
- func Uncurry4[GA ~func(R) A, R, T1, T2, T3, T4, A any](f func(T1) func(T2) func(T3) func(T4) GA) func(R, T1, T2, T3, T4) A
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ap ¶
func Ap[GA ~func(R) A, GB ~func(R) B, GAB ~func(R) func(A) B, R, A, B any](fa GA) func(GAB) GB
Ap applies a function to an argument under a type constructor.
func Asks ¶
func Asks[GA ~func(R) A, R, A any](f GA) GA
Asks projects a value from the global context in a Reader
func AsksReader ¶
func AsksReader[GA ~func(R) A, R, A any](f func(R) GA) GA
func Chain ¶
func Chain[GA ~func(R) A, GB ~func(R) B, R, A, B any](f func(A) GB) func(GA) GB
Chain composes computations in sequence, using the return value of one computation to determine the next computation.
func Compose ¶
func Compose[AB ~func(A) B, BC ~func(B) C, AC ~func(A) C, A, B, C any](ab AB) func(BC) AC
func Curry2 ¶
func Curry2[GA ~func(R) A, R, T1, T2, A any](f func(R, T1, T2) A) func(T1) func(T2) GA
func Curry3 ¶
func Curry3[GA ~func(R) A, R, T1, T2, T3, A any](f func(R, T1, T2, T3) A) func(T1) func(T2) func(T3) GA
func Curry4 ¶
func Curry4[GA ~func(R) A, R, T1, T2, T3, T4, A any](f func(R, T1, T2, T3, T4) A) func(T1) func(T2) func(T3) func(T4) GA
func From0 ¶
func From0[GRA ~func(C) R, F ~func(C) R, C, R any](f F) func() GRA
From0 converts a function with 1 parameters returning a [R] into a function with 0 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From1 ¶
func From1[GRA ~func(C) R, F ~func(C, T0) R, T0, C, R any](f F) func(T0) GRA
From1 converts a function with 2 parameters returning a [R] into a function with 1 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From10 ¶
func From10[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) R, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) GRA
From10 converts a function with 11 parameters returning a [R] into a function with 10 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From2 ¶
func From2[GRA ~func(C) R, F ~func(C, T0, T1) R, T0, T1, C, R any](f F) func(T0, T1) GRA
From2 converts a function with 3 parameters returning a [R] into a function with 2 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From3 ¶
func From3[GRA ~func(C) R, F ~func(C, T0, T1, T2) R, T0, T1, T2, C, R any](f F) func(T0, T1, T2) GRA
From3 converts a function with 4 parameters returning a [R] into a function with 3 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From4 ¶
func From4[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3) R, T0, T1, T2, T3, C, R any](f F) func(T0, T1, T2, T3) GRA
From4 converts a function with 5 parameters returning a [R] into a function with 4 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From5 ¶
func From5[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4) R, T0, T1, T2, T3, T4, C, R any](f F) func(T0, T1, T2, T3, T4) GRA
From5 converts a function with 6 parameters returning a [R] into a function with 5 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From6 ¶
func From6[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5) R, T0, T1, T2, T3, T4, T5, C, R any](f F) func(T0, T1, T2, T3, T4, T5) GRA
From6 converts a function with 7 parameters returning a [R] into a function with 6 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From7 ¶
func From7[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6) R, T0, T1, T2, T3, T4, T5, T6, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) GRA
From7 converts a function with 8 parameters returning a [R] into a function with 7 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From8 ¶
func From8[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) R, T0, T1, T2, T3, T4, T5, T6, T7, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) GRA
From8 converts a function with 9 parameters returning a [R] into a function with 8 parameters returning a [GRA] The first parameter is considered to be the context [C].
func From9 ¶
func From9[GRA ~func(C) R, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) R, T0, T1, T2, T3, T4, T5, T6, T7, T8, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8) GRA
From9 converts a function with 10 parameters returning a [R] into a function with 9 parameters returning a [GRA] The first parameter is considered to be the context [C].
func Local ¶
func Local[GA1 ~func(R1) A, GA2 ~func(R2) A, R2, R1, A any](f func(R2) R1) func(GA1) GA2
Local changes the value of the local context during the execution of the action `ma` (similar to `Contravariant`'s `contramap`).
func MakeReader ¶
func MakeReader[GA ~func(R) A, R, A any](r GA) GA
MakeReader creates a reader, i.e. a method that accepts a context and that returns a value
func Map ¶
func Map[GA ~func(E) A, GB ~func(E) B, E, A, B any](f func(A) B) func(GA) GB
Map can be used to turn functions `func(A)B` into functions `(fa F[A])F[B]` whose argument and return types use the type constructor `F` to represent some computational context.
func MonadAp ¶
func MonadAp[GA ~func(R) A, GB ~func(R) B, GAB ~func(R) func(A) B, R, A, B any](fab GAB, fa GA) GB
func MonadChain ¶
func MonadChain[GA ~func(R) A, GB ~func(R) B, R, A, B any](ma GA, f func(A) GB) GB
func MonadTraverseArray ¶
func MonadTraverseArray[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](tas AAS, f func(A) GB) GBS
TraverseArray transforms an array
func Promap ¶
func Promap[GA ~func(E) A, GB ~func(D) B, E, A, D, B any](f func(D) E, g func(A) B) func(GA) GB
func Read ¶
func Read[GA ~func(E) A, E, A any](e E) func(GA) A
Read applies a context to a reader to obtain its value
func SequenceArray ¶
func SequenceArray[GA ~func(R) A, GAS ~func(R) AAS, AAS ~[]A, GAAS ~[]GA, R, A any](ma GAAS) GAS
SequenceArray converts a homogeneous sequence of either into an either of sequence
func SequenceT1 ¶
func SequenceT2 ¶
func SequenceT3 ¶
func SequenceT4 ¶
func TraverseArray ¶
func TraverseArray[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](f func(A) GB) func(AAS) GBS
TraverseArray transforms an array
func TraverseArrayWithIndex ¶ added in v1.0.29
func TraverseArrayWithIndex[GB ~func(R) B, GBS ~func(R) BBS, AAS ~[]A, BBS ~[]B, R, A, B any](f func(int, A) GB) func(AAS) GBS
TraverseArrayWithIndex transforms an array
func Uncurry2 ¶
func Uncurry2[GA ~func(R) A, R, T1, T2, A any](f func(T1) func(T2) GA) func(R, T1, T2) A
Types ¶
This section is empty.