1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-06-25 00:36:54 +02:00
Files
fp-go/context/readerioeither/generic/gen.go

811 lines
43 KiB
Go
Raw Normal View History

package generic
// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at
// 2023-07-20 23:13:55.3160763 +0200 CEST m=+0.008374301
import (
"context"
E "github.com/IBM/fp-go/either"
RE "github.com/IBM/fp-go/readerioeither/generic"
A "github.com/IBM/fp-go/internal/apply"
T "github.com/IBM/fp-go/tuple"
)
// Eitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning a [GRA]
// The inverse function is [Uneitherize0]
func Eitherize0[GRA ~func(context.Context) GIOA, F ~func(context.Context) (R, error), GIOA ~func() E.Either[error, R], R any](f F) func() GRA {
return RE.Eitherize0[GRA](f)
}
// Eitherize1 converts a function with 1 parameters returning a tuple into a function with 1 parameters returning a [GRA]
// The inverse function is [Uneitherize1]
func Eitherize1[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0) (R, error), GIOA ~func() E.Either[error, R], T0, R any](f F) func(T0) GRA {
return RE.Eitherize1[GRA](f)
}
// SequenceT1 converts 1 readers into a reader of a [T.Tuple1].
func SequenceT1[
GR_TUPLE1 ~func(context.Context) GIO_TUPLE1,
GR_T1 ~func(context.Context) GIO_T1,
GIO_TUPLE1 ~func() E.Either[error, T.Tuple1[T1]],
GIO_T1 ~func() E.Either[error, T1],
T1 any](
t1 GR_T1,
) GR_TUPLE1 {
return A.SequenceT1(
Map[GR_T1, GR_TUPLE1, GIO_T1],
t1,
)
}
// SequenceTuple1 converts a [T.Tuple1] of readers into a reader of a [T.Tuple1].
func SequenceTuple1[
GR_TUPLE1 ~func(context.Context) GIO_TUPLE1,
GR_T1 ~func(context.Context) GIO_T1,
GIO_TUPLE1 ~func() E.Either[error, T.Tuple1[T1]],
GIO_T1 ~func() E.Either[error, T1],
T1 any](t T.Tuple1[GR_T1]) GR_TUPLE1 {
return A.SequenceTuple1(
Map[GR_T1, GR_TUPLE1, GIO_T1],
t,
)
}
// Eitherize2 converts a function with 2 parameters returning a tuple into a function with 2 parameters returning a [GRA]
// The inverse function is [Uneitherize2]
func Eitherize2[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1) (R, error), GIOA ~func() E.Either[error, R], T0, T1, R any](f F) func(T0, T1) GRA {
return RE.Eitherize2[GRA](f)
}
// SequenceT2 converts 2 readers into a reader of a [T.Tuple2].
func SequenceT2[
GR_TUPLE2 ~func(context.Context) GIO_TUPLE2,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GIO_TUPLE2 ~func() E.Either[error, T.Tuple2[T1, T2]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
T1,
T2 any](
t1 GR_T1,
t2 GR_T2,
) GR_TUPLE2 {
return A.SequenceT2(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) T.Tuple2[T1, T2]], GIO_T1],
Ap[GR_TUPLE2, func(context.Context) func() E.Either[error, func(T2) T.Tuple2[T1, T2]], GR_T2],
t1,
t2,
)
}
// SequenceTuple2 converts a [T.Tuple2] of readers into a reader of a [T.Tuple2].
func SequenceTuple2[
GR_TUPLE2 ~func(context.Context) GIO_TUPLE2,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GIO_TUPLE2 ~func() E.Either[error, T.Tuple2[T1, T2]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
T1,
T2 any](t T.Tuple2[GR_T1, GR_T2]) GR_TUPLE2 {
return A.SequenceTuple2(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) T.Tuple2[T1, T2]], GIO_T1],
Ap[GR_TUPLE2, func(context.Context) func() E.Either[error, func(T2) T.Tuple2[T1, T2]], GR_T2],
t,
)
}
// Eitherize3 converts a function with 3 parameters returning a tuple into a function with 3 parameters returning a [GRA]
// The inverse function is [Uneitherize3]
func Eitherize3[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, R any](f F) func(T0, T1, T2) GRA {
return RE.Eitherize3[GRA](f)
}
// SequenceT3 converts 3 readers into a reader of a [T.Tuple3].
func SequenceT3[
GR_TUPLE3 ~func(context.Context) GIO_TUPLE3,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GIO_TUPLE3 ~func() E.Either[error, T.Tuple3[T1, T2, T3]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
T1,
T2,
T3 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
) GR_TUPLE3 {
return A.SequenceT3(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) T.Tuple3[T1, T2, T3]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) T.Tuple3[T1, T2, T3]], func(context.Context) func() E.Either[error, func(T2) func(T3) T.Tuple3[T1, T2, T3]], GR_T2],
Ap[GR_TUPLE3, func(context.Context) func() E.Either[error, func(T3) T.Tuple3[T1, T2, T3]], GR_T3],
t1,
t2,
t3,
)
}
// SequenceTuple3 converts a [T.Tuple3] of readers into a reader of a [T.Tuple3].
func SequenceTuple3[
GR_TUPLE3 ~func(context.Context) GIO_TUPLE3,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GIO_TUPLE3 ~func() E.Either[error, T.Tuple3[T1, T2, T3]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
T1,
T2,
T3 any](t T.Tuple3[GR_T1, GR_T2, GR_T3]) GR_TUPLE3 {
return A.SequenceTuple3(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) T.Tuple3[T1, T2, T3]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) T.Tuple3[T1, T2, T3]], func(context.Context) func() E.Either[error, func(T2) func(T3) T.Tuple3[T1, T2, T3]], GR_T2],
Ap[GR_TUPLE3, func(context.Context) func() E.Either[error, func(T3) T.Tuple3[T1, T2, T3]], GR_T3],
t,
)
}
// Eitherize4 converts a function with 4 parameters returning a tuple into a function with 4 parameters returning a [GRA]
// The inverse function is [Uneitherize4]
func Eitherize4[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, R any](f F) func(T0, T1, T2, T3) GRA {
return RE.Eitherize4[GRA](f)
}
// SequenceT4 converts 4 readers into a reader of a [T.Tuple4].
func SequenceT4[
GR_TUPLE4 ~func(context.Context) GIO_TUPLE4,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GIO_TUPLE4 ~func() E.Either[error, T.Tuple4[T1, T2, T3, T4]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
T1,
T2,
T3,
T4 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
) GR_TUPLE4 {
return A.SequenceT4(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) T.Tuple4[T1, T2, T3, T4]], func(context.Context) func() E.Either[error, func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T3],
Ap[GR_TUPLE4, func(context.Context) func() E.Either[error, func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T4],
t1,
t2,
t3,
t4,
)
}
// SequenceTuple4 converts a [T.Tuple4] of readers into a reader of a [T.Tuple4].
func SequenceTuple4[
GR_TUPLE4 ~func(context.Context) GIO_TUPLE4,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GIO_TUPLE4 ~func() E.Either[error, T.Tuple4[T1, T2, T3, T4]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
T1,
T2,
T3,
T4 any](t T.Tuple4[GR_T1, GR_T2, GR_T3, GR_T4]) GR_TUPLE4 {
return A.SequenceTuple4(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) T.Tuple4[T1, T2, T3, T4]], func(context.Context) func() E.Either[error, func(T3) func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T3],
Ap[GR_TUPLE4, func(context.Context) func() E.Either[error, func(T4) T.Tuple4[T1, T2, T3, T4]], GR_T4],
t,
)
}
// Eitherize5 converts a function with 5 parameters returning a tuple into a function with 5 parameters returning a [GRA]
// The inverse function is [Uneitherize5]
func Eitherize5[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, R any](f F) func(T0, T1, T2, T3, T4) GRA {
return RE.Eitherize5[GRA](f)
}
// SequenceT5 converts 5 readers into a reader of a [T.Tuple5].
func SequenceT5[
GR_TUPLE5 ~func(context.Context) GIO_TUPLE5,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GIO_TUPLE5 ~func() E.Either[error, T.Tuple5[T1, T2, T3, T4, T5]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
T1,
T2,
T3,
T4,
T5 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
) GR_TUPLE5 {
return A.SequenceT5(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T4],
Ap[GR_TUPLE5, func(context.Context) func() E.Either[error, func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T5],
t1,
t2,
t3,
t4,
t5,
)
}
// SequenceTuple5 converts a [T.Tuple5] of readers into a reader of a [T.Tuple5].
func SequenceTuple5[
GR_TUPLE5 ~func(context.Context) GIO_TUPLE5,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GIO_TUPLE5 ~func() E.Either[error, T.Tuple5[T1, T2, T3, T4, T5]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
T1,
T2,
T3,
T4,
T5 any](t T.Tuple5[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5]) GR_TUPLE5 {
return A.SequenceTuple5(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) T.Tuple5[T1, T2, T3, T4, T5]], func(context.Context) func() E.Either[error, func(T4) func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T4],
Ap[GR_TUPLE5, func(context.Context) func() E.Either[error, func(T5) T.Tuple5[T1, T2, T3, T4, T5]], GR_T5],
t,
)
}
// Eitherize6 converts a function with 6 parameters returning a tuple into a function with 6 parameters returning a [GRA]
// The inverse function is [Uneitherize6]
func Eitherize6[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4, T5) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, R any](f F) func(T0, T1, T2, T3, T4, T5) GRA {
return RE.Eitherize6[GRA](f)
}
// SequenceT6 converts 6 readers into a reader of a [T.Tuple6].
func SequenceT6[
GR_TUPLE6 ~func(context.Context) GIO_TUPLE6,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GIO_TUPLE6 ~func() E.Either[error, T.Tuple6[T1, T2, T3, T4, T5, T6]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
T1,
T2,
T3,
T4,
T5,
T6 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
t6 GR_T6,
) GR_TUPLE6 {
return A.SequenceT6(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T5],
Ap[GR_TUPLE6, func(context.Context) func() E.Either[error, func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T6],
t1,
t2,
t3,
t4,
t5,
t6,
)
}
// SequenceTuple6 converts a [T.Tuple6] of readers into a reader of a [T.Tuple6].
func SequenceTuple6[
GR_TUPLE6 ~func(context.Context) GIO_TUPLE6,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GIO_TUPLE6 ~func() E.Either[error, T.Tuple6[T1, T2, T3, T4, T5, T6]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
T1,
T2,
T3,
T4,
T5,
T6 any](t T.Tuple6[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5, GR_T6]) GR_TUPLE6 {
return A.SequenceTuple6(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], func(context.Context) func() E.Either[error, func(T5) func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T5],
Ap[GR_TUPLE6, func(context.Context) func() E.Either[error, func(T6) T.Tuple6[T1, T2, T3, T4, T5, T6]], GR_T6],
t,
)
}
// Eitherize7 converts a function with 7 parameters returning a tuple into a function with 7 parameters returning a [GRA]
// The inverse function is [Uneitherize7]
func Eitherize7[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4, T5, T6) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) GRA {
return RE.Eitherize7[GRA](f)
}
// SequenceT7 converts 7 readers into a reader of a [T.Tuple7].
func SequenceT7[
GR_TUPLE7 ~func(context.Context) GIO_TUPLE7,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GIO_TUPLE7 ~func() E.Either[error, T.Tuple7[T1, T2, T3, T4, T5, T6, T7]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
T1,
T2,
T3,
T4,
T5,
T6,
T7 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
t6 GR_T6,
t7 GR_T7,
) GR_TUPLE7 {
return A.SequenceT7(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T6],
Ap[GR_TUPLE7, func(context.Context) func() E.Either[error, func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T7],
t1,
t2,
t3,
t4,
t5,
t6,
t7,
)
}
// SequenceTuple7 converts a [T.Tuple7] of readers into a reader of a [T.Tuple7].
func SequenceTuple7[
GR_TUPLE7 ~func(context.Context) GIO_TUPLE7,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GIO_TUPLE7 ~func() E.Either[error, T.Tuple7[T1, T2, T3, T4, T5, T6, T7]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
T1,
T2,
T3,
T4,
T5,
T6,
T7 any](t T.Tuple7[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5, GR_T6, GR_T7]) GR_TUPLE7 {
return A.SequenceTuple7(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], func(context.Context) func() E.Either[error, func(T6) func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T6],
Ap[GR_TUPLE7, func(context.Context) func() E.Either[error, func(T7) T.Tuple7[T1, T2, T3, T4, T5, T6, T7]], GR_T7],
t,
)
}
// Eitherize8 converts a function with 8 parameters returning a tuple into a function with 8 parameters returning a [GRA]
// The inverse function is [Uneitherize8]
func Eitherize8[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4, T5, T6, T7) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) GRA {
return RE.Eitherize8[GRA](f)
}
// SequenceT8 converts 8 readers into a reader of a [T.Tuple8].
func SequenceT8[
GR_TUPLE8 ~func(context.Context) GIO_TUPLE8,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GIO_TUPLE8 ~func() E.Either[error, T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
t6 GR_T6,
t7 GR_T7,
t8 GR_T8,
) GR_TUPLE8 {
return A.SequenceT8(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T7],
Ap[GR_TUPLE8, func(context.Context) func() E.Either[error, func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T8],
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
)
}
// SequenceTuple8 converts a [T.Tuple8] of readers into a reader of a [T.Tuple8].
func SequenceTuple8[
GR_TUPLE8 ~func(context.Context) GIO_TUPLE8,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GIO_TUPLE8 ~func() E.Either[error, T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8 any](t T.Tuple8[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5, GR_T6, GR_T7, GR_T8]) GR_TUPLE8 {
return A.SequenceTuple8(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], func(context.Context) func() E.Either[error, func(T7) func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T7],
Ap[GR_TUPLE8, func(context.Context) func() E.Either[error, func(T8) T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]], GR_T8],
t,
)
}
// Eitherize9 converts a function with 9 parameters returning a tuple into a function with 9 parameters returning a [GRA]
// The inverse function is [Uneitherize9]
func Eitherize9[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4, T5, T6, T7, T8) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, T8, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8) GRA {
return RE.Eitherize9[GRA](f)
}
// SequenceT9 converts 9 readers into a reader of a [T.Tuple9].
func SequenceT9[
GR_TUPLE9 ~func(context.Context) GIO_TUPLE9,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GR_T9 ~func(context.Context) GIO_T9,
GIO_TUPLE9 ~func() E.Either[error, T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
GIO_T9 ~func() E.Either[error, T9],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
t6 GR_T6,
t7 GR_T7,
t8 GR_T8,
t9 GR_T9,
) GR_TUPLE9 {
return A.SequenceT9(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T7],
Ap[func(context.Context) func() E.Either[error, func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T8],
Ap[GR_TUPLE9, func(context.Context) func() E.Either[error, func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T9],
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
)
}
// SequenceTuple9 converts a [T.Tuple9] of readers into a reader of a [T.Tuple9].
func SequenceTuple9[
GR_TUPLE9 ~func(context.Context) GIO_TUPLE9,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GR_T9 ~func(context.Context) GIO_T9,
GIO_TUPLE9 ~func() E.Either[error, T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
GIO_T9 ~func() E.Either[error, T9],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9 any](t T.Tuple9[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5, GR_T6, GR_T7, GR_T8, GR_T9]) GR_TUPLE9 {
return A.SequenceTuple9(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T7],
Ap[func(context.Context) func() E.Either[error, func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], func(context.Context) func() E.Either[error, func(T8) func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T8],
Ap[GR_TUPLE9, func(context.Context) func() E.Either[error, func(T9) T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], GR_T9],
t,
)
}
// Eitherize10 converts a function with 10 parameters returning a tuple into a function with 10 parameters returning a [GRA]
// The inverse function is [Uneitherize10]
func Eitherize10[GRA ~func(context.Context) GIOA, F ~func(context.Context, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) GRA {
return RE.Eitherize10[GRA](f)
}
// SequenceT10 converts 10 readers into a reader of a [T.Tuple10].
func SequenceT10[
GR_TUPLE10 ~func(context.Context) GIO_TUPLE10,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GR_T9 ~func(context.Context) GIO_T9,
GR_T10 ~func(context.Context) GIO_T10,
GIO_TUPLE10 ~func() E.Either[error, T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
GIO_T9 ~func() E.Either[error, T9],
GIO_T10 ~func() E.Either[error, T10],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10 any](
t1 GR_T1,
t2 GR_T2,
t3 GR_T3,
t4 GR_T4,
t5 GR_T5,
t6 GR_T6,
t7 GR_T7,
t8 GR_T8,
t9 GR_T9,
t10 GR_T10,
) GR_TUPLE10 {
return A.SequenceT10(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T7],
Ap[func(context.Context) func() E.Either[error, func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T8],
Ap[func(context.Context) func() E.Either[error, func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T9],
Ap[GR_TUPLE10, func(context.Context) func() E.Either[error, func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T10],
t1,
t2,
t3,
t4,
t5,
t6,
t7,
t8,
t9,
t10,
)
}
// SequenceTuple10 converts a [T.Tuple10] of readers into a reader of a [T.Tuple10].
func SequenceTuple10[
GR_TUPLE10 ~func(context.Context) GIO_TUPLE10,
GR_T1 ~func(context.Context) GIO_T1,
GR_T2 ~func(context.Context) GIO_T2,
GR_T3 ~func(context.Context) GIO_T3,
GR_T4 ~func(context.Context) GIO_T4,
GR_T5 ~func(context.Context) GIO_T5,
GR_T6 ~func(context.Context) GIO_T6,
GR_T7 ~func(context.Context) GIO_T7,
GR_T8 ~func(context.Context) GIO_T8,
GR_T9 ~func(context.Context) GIO_T9,
GR_T10 ~func(context.Context) GIO_T10,
GIO_TUPLE10 ~func() E.Either[error, T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]],
GIO_T1 ~func() E.Either[error, T1],
GIO_T2 ~func() E.Either[error, T2],
GIO_T3 ~func() E.Either[error, T3],
GIO_T4 ~func() E.Either[error, T4],
GIO_T5 ~func() E.Either[error, T5],
GIO_T6 ~func() E.Either[error, T6],
GIO_T7 ~func() E.Either[error, T7],
GIO_T8 ~func() E.Either[error, T8],
GIO_T9 ~func() E.Either[error, T9],
GIO_T10 ~func() E.Either[error, T10],
T1,
T2,
T3,
T4,
T5,
T6,
T7,
T8,
T9,
T10 any](t T.Tuple10[GR_T1, GR_T2, GR_T3, GR_T4, GR_T5, GR_T6, GR_T7, GR_T8, GR_T9, GR_T10]) GR_TUPLE10 {
return A.SequenceTuple10(
Map[GR_T1, func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GIO_T1],
Ap[func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T2) func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T2],
Ap[func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T3) func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T3],
Ap[func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T4) func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T4],
Ap[func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T5) func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T5],
Ap[func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T6) func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T6],
Ap[func(context.Context) func() E.Either[error, func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T7) func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T7],
Ap[func(context.Context) func() E.Either[error, func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T8) func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T8],
Ap[func(context.Context) func() E.Either[error, func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], func(context.Context) func() E.Either[error, func(T9) func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T9],
Ap[GR_TUPLE10, func(context.Context) func() E.Either[error, func(T10) T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], GR_T10],
t,
)
}