mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
fix: do not use v8
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Code generated by go generate; DO NOT EDIT.
|
||||
// This file was generated by robots at
|
||||
// 2024-02-29 16:19:28.6907128 +0100 CET m=+0.032796101
|
||||
// 2024-05-24 17:26:07.2835624 +0200 CEST m=+0.011499301
|
||||
|
||||
package readerioeither
|
||||
|
||||
@@ -20,6 +20,12 @@ func Eitherize0[F ~func(C) (R, error), C, R any](f F) func() ReaderIOEither[C, e
|
||||
return G.Eitherize0[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize0 converts a function with 1 parameters returning a [ReaderIOEither[C, error, R]] into a function with 0 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize0[F ~func() ReaderIOEither[C, error, R], C, R any](f F) func(C) (R, error) {
|
||||
return G.Uneitherize0[ReaderIOEither[C, error, R], func(C) (R, error)](f)
|
||||
}
|
||||
|
||||
// From1 converts a function with 2 parameters returning a tuple into a function with 1 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From1[F ~func(C, T0) func() (R, error), T0, C, R any](f F) func(T0) ReaderIOEither[C, error, R] {
|
||||
@@ -32,6 +38,12 @@ func Eitherize1[F ~func(C, T0) (R, error), T0, C, R any](f F) func(T0) ReaderIOE
|
||||
return G.Eitherize1[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize1 converts a function with 2 parameters returning a [ReaderIOEither[C, error, R]] into a function with 1 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize1[F ~func(T0) ReaderIOEither[C, error, R], T0, C, R any](f F) func(C, T0) (R, error) {
|
||||
return G.Uneitherize1[ReaderIOEither[C, error, R], func(C, T0) (R, error)](f)
|
||||
}
|
||||
|
||||
// From2 converts a function with 3 parameters returning a tuple into a function with 2 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From2[F ~func(C, T0, T1) func() (R, error), T0, T1, C, R any](f F) func(T0, T1) ReaderIOEither[C, error, R] {
|
||||
@@ -44,6 +56,12 @@ func Eitherize2[F ~func(C, T0, T1) (R, error), T0, T1, C, R any](f F) func(T0, T
|
||||
return G.Eitherize2[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize2 converts a function with 3 parameters returning a [ReaderIOEither[C, error, R]] into a function with 2 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize2[F ~func(T0, T1) ReaderIOEither[C, error, R], T0, T1, C, R any](f F) func(C, T0, T1) (R, error) {
|
||||
return G.Uneitherize2[ReaderIOEither[C, error, R], func(C, T0, T1) (R, error)](f)
|
||||
}
|
||||
|
||||
// From3 converts a function with 4 parameters returning a tuple into a function with 3 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From3[F ~func(C, T0, T1, T2) func() (R, error), T0, T1, T2, C, R any](f F) func(T0, T1, T2) ReaderIOEither[C, error, R] {
|
||||
@@ -56,6 +74,12 @@ func Eitherize3[F ~func(C, T0, T1, T2) (R, error), T0, T1, T2, C, R any](f F) fu
|
||||
return G.Eitherize3[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize3 converts a function with 4 parameters returning a [ReaderIOEither[C, error, R]] into a function with 3 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize3[F ~func(T0, T1, T2) ReaderIOEither[C, error, R], T0, T1, T2, C, R any](f F) func(C, T0, T1, T2) (R, error) {
|
||||
return G.Uneitherize3[ReaderIOEither[C, error, R], func(C, T0, T1, T2) (R, error)](f)
|
||||
}
|
||||
|
||||
// From4 converts a function with 5 parameters returning a tuple into a function with 4 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From4[F ~func(C, T0, T1, T2, T3) func() (R, error), T0, T1, T2, T3, C, R any](f F) func(T0, T1, T2, T3) ReaderIOEither[C, error, R] {
|
||||
@@ -68,6 +92,12 @@ func Eitherize4[F ~func(C, T0, T1, T2, T3) (R, error), T0, T1, T2, T3, C, R any]
|
||||
return G.Eitherize4[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize4 converts a function with 5 parameters returning a [ReaderIOEither[C, error, R]] into a function with 4 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize4[F ~func(T0, T1, T2, T3) ReaderIOEither[C, error, R], T0, T1, T2, T3, C, R any](f F) func(C, T0, T1, T2, T3) (R, error) {
|
||||
return G.Uneitherize4[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3) (R, error)](f)
|
||||
}
|
||||
|
||||
// From5 converts a function with 6 parameters returning a tuple into a function with 5 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From5[F ~func(C, T0, T1, T2, T3, T4) func() (R, error), T0, T1, T2, T3, T4, C, R any](f F) func(T0, T1, T2, T3, T4) ReaderIOEither[C, error, R] {
|
||||
@@ -80,6 +110,12 @@ func Eitherize5[F ~func(C, T0, T1, T2, T3, T4) (R, error), T0, T1, T2, T3, T4, C
|
||||
return G.Eitherize5[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize5 converts a function with 6 parameters returning a [ReaderIOEither[C, error, R]] into a function with 5 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize5[F ~func(T0, T1, T2, T3, T4) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, C, R any](f F) func(C, T0, T1, T2, T3, T4) (R, error) {
|
||||
return G.Uneitherize5[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4) (R, error)](f)
|
||||
}
|
||||
|
||||
// From6 converts a function with 7 parameters returning a tuple into a function with 6 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From6[F ~func(C, T0, T1, T2, T3, T4, T5) func() (R, error), T0, T1, T2, T3, T4, T5, C, R any](f F) func(T0, T1, T2, T3, T4, T5) ReaderIOEither[C, error, R] {
|
||||
@@ -92,6 +128,12 @@ func Eitherize6[F ~func(C, T0, T1, T2, T3, T4, T5) (R, error), T0, T1, T2, T3, T
|
||||
return G.Eitherize6[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize6 converts a function with 7 parameters returning a [ReaderIOEither[C, error, R]] into a function with 6 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize6[F ~func(T0, T1, T2, T3, T4, T5) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, T5, C, R any](f F) func(C, T0, T1, T2, T3, T4, T5) (R, error) {
|
||||
return G.Uneitherize6[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4, T5) (R, error)](f)
|
||||
}
|
||||
|
||||
// From7 converts a function with 8 parameters returning a tuple into a function with 7 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From7[F ~func(C, T0, T1, T2, T3, T4, T5, T6) func() (R, error), T0, T1, T2, T3, T4, T5, T6, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) ReaderIOEither[C, error, R] {
|
||||
@@ -104,6 +146,12 @@ func Eitherize7[F ~func(C, T0, T1, T2, T3, T4, T5, T6) (R, error), T0, T1, T2, T
|
||||
return G.Eitherize7[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize7 converts a function with 8 parameters returning a [ReaderIOEither[C, error, R]] into a function with 7 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize7[F ~func(T0, T1, T2, T3, T4, T5, T6) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, T5, T6, C, R any](f F) func(C, T0, T1, T2, T3, T4, T5, T6) (R, error) {
|
||||
return G.Uneitherize7[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4, T5, T6) (R, error)](f)
|
||||
}
|
||||
|
||||
// From8 converts a function with 9 parameters returning a tuple into a function with 8 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From8[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) func() (R, error), T0, T1, T2, T3, T4, T5, T6, T7, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) ReaderIOEither[C, error, R] {
|
||||
@@ -116,6 +164,12 @@ func Eitherize8[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) (R, error), T0, T1, T
|
||||
return G.Eitherize8[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize8 converts a function with 9 parameters returning a [ReaderIOEither[C, error, R]] into a function with 8 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize8[F ~func(T0, T1, T2, T3, T4, T5, T6, T7) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, T5, T6, T7, C, R any](f F) func(C, T0, T1, T2, T3, T4, T5, T6, T7) (R, error) {
|
||||
return G.Uneitherize8[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4, T5, T6, T7) (R, error)](f)
|
||||
}
|
||||
|
||||
// From9 converts a function with 10 parameters returning a tuple into a function with 9 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From9[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) func() (R, error), T0, T1, T2, T3, T4, T5, T6, T7, T8, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8) ReaderIOEither[C, error, R] {
|
||||
@@ -128,6 +182,12 @@ func Eitherize9[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) (R, error), T0, T
|
||||
return G.Eitherize9[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize9 converts a function with 10 parameters returning a [ReaderIOEither[C, error, R]] into a function with 9 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize9[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, T5, T6, T7, T8, C, R any](f F) func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) (R, error) {
|
||||
return G.Uneitherize9[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) (R, error)](f)
|
||||
}
|
||||
|
||||
// From10 converts a function with 11 parameters returning a tuple into a function with 10 parameters returning a [ReaderIOEither[R]]
|
||||
// The first parameter is considered to be the context [C].
|
||||
func From10[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) func() (R, error), 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) ReaderIOEither[C, error, R] {
|
||||
@@ -139,3 +199,9 @@ func From10[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) func() (R, error)
|
||||
func Eitherize10[F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error), 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) ReaderIOEither[C, error, R] {
|
||||
return G.Eitherize10[ReaderIOEither[C, error, R]](f)
|
||||
}
|
||||
|
||||
// Uneitherize10 converts a function with 11 parameters returning a [ReaderIOEither[C, error, R]] into a function with 10 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize10[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) ReaderIOEither[C, error, R], T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, C, R any](f F) func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error) {
|
||||
return G.Uneitherize10[ReaderIOEither[C, error, R], func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error)](f)
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// Code generated by go generate; DO NOT EDIT.
|
||||
// This file was generated by robots at
|
||||
// 2024-02-29 16:19:28.691247 +0100 CET m=+0.033330301
|
||||
// 2024-05-24 17:26:07.2835624 +0200 CEST m=+0.011499301
|
||||
package generic
|
||||
|
||||
import (
|
||||
@@ -26,6 +26,14 @@ func Eitherize0[GRA ~func(C) GIOA, F ~func(C) (R, error), GIOA ~func() E.Either[
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize0 converts a function with 0 parameters returning a [GRA] into a function with 0 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize0[GRA ~func(C) GIOA, F ~func(C) (R, error), GIOA ~func() E.Either[error, R], C, R any](f func() GRA) F {
|
||||
return func(c C) (R, error) {
|
||||
return E.UnwrapError(f()(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From1 converts a function with 2 parameters returning a tuple into a function with 1 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From1[GRA ~func(C) GIOA, F ~func(C, T0) func() (R, error), GIOA ~func() E.Either[error, R], T0, C, R any](f F) func(T0) GRA {
|
||||
@@ -44,6 +52,14 @@ func Eitherize1[GRA ~func(C) GIOA, F ~func(C, T0) (R, error), GIOA ~func() E.Eit
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize1 converts a function with 1 parameters returning a [GRA] into a function with 1 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize1[GRA ~func(C) GIOA, F ~func(C, T0) (R, error), GIOA ~func() E.Either[error, R], T0, C, R any](f func(T0) GRA) F {
|
||||
return func(c C, t0 T0) (R, error) {
|
||||
return E.UnwrapError(f(t0)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From2 converts a function with 3 parameters returning a tuple into a function with 2 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From2[GRA ~func(C) GIOA, F ~func(C, T0, T1) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, C, R any](f F) func(T0, T1) GRA {
|
||||
@@ -62,6 +78,14 @@ func Eitherize2[GRA ~func(C) GIOA, F ~func(C, T0, T1) (R, error), GIOA ~func() E
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize2 converts a function with 2 parameters returning a [GRA] into a function with 2 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize2[GRA ~func(C) GIOA, F ~func(C, T0, T1) (R, error), GIOA ~func() E.Either[error, R], T0, T1, C, R any](f func(T0, T1) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From3 converts a function with 4 parameters returning a tuple into a function with 3 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From3[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, C, R any](f F) func(T0, T1, T2) GRA {
|
||||
@@ -80,6 +104,14 @@ func Eitherize3[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2) (R, error), GIOA ~func
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize3 converts a function with 3 parameters returning a [GRA] into a function with 3 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize3[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, C, R any](f func(T0, T1, T2) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From4 converts a function with 5 parameters returning a tuple into a function with 4 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From4[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, C, R any](f F) func(T0, T1, T2, T3) GRA {
|
||||
@@ -98,6 +130,14 @@ func Eitherize4[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3) (R, error), GIOA ~
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize4 converts a function with 4 parameters returning a [GRA] into a function with 4 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize4[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, C, R any](f func(T0, T1, T2, T3) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From5 converts a function with 6 parameters returning a tuple into a function with 5 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From5[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, C, R any](f F) func(T0, T1, T2, T3, T4) GRA {
|
||||
@@ -116,6 +156,14 @@ func Eitherize5[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4) (R, error), GI
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize5 converts a function with 5 parameters returning a [GRA] into a function with 5 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize5[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, C, R any](f func(T0, T1, T2, T3, T4) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From6 converts a function with 7 parameters returning a tuple into a function with 6 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From6[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, C, R any](f F) func(T0, T1, T2, T3, T4, T5) GRA {
|
||||
@@ -134,6 +182,14 @@ func Eitherize6[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5) (R, error)
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize6 converts a function with 6 parameters returning a [GRA] into a function with 6 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize6[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, C, R any](f func(T0, T1, T2, T3, T4, T5) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4, t5)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From7 converts a function with 8 parameters returning a tuple into a function with 7 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From7[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) GRA {
|
||||
@@ -152,6 +208,14 @@ func Eitherize7[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6) (R, er
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize7 converts a function with 7 parameters returning a [GRA] into a function with 7 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize7[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, C, R any](f func(T0, T1, T2, T3, T4, T5, T6) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4, t5, t6)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From8 converts a function with 9 parameters returning a tuple into a function with 8 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From8[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) func() (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, C, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) GRA {
|
||||
@@ -170,6 +234,14 @@ func Eitherize8[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) (R
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize8 converts a function with 8 parameters returning a [GRA] into a function with 8 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize8[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7) (R, error), GIOA ~func() E.Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, C, R any](f func(T0, T1, T2, T3, T4, T5, T6, T7) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From9 converts a function with 10 parameters returning a tuple into a function with 9 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From9[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8) func() (R, error), GIOA ~func() E.Either[error, 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 {
|
||||
@@ -188,6 +260,14 @@ func Eitherize9[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize9 converts a function with 9 parameters returning a [GRA] into a function with 9 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize9[GRA ~func(C) GIOA, F ~func(C, 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, C, R any](f func(T0, T1, T2, T3, T4, T5, T6, T7, T8) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7, t8)(c)())
|
||||
}
|
||||
}
|
||||
|
||||
// From10 converts a function with 11 parameters returning a tuple into a function with 10 parameters returning a [GRA]
|
||||
// The first parameter is considerd to be the context [C].
|
||||
func From10[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) func() (R, error), GIOA ~func() E.Either[error, 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 {
|
||||
@@ -205,3 +285,11 @@ func Eitherize10[GRA ~func(C) GIOA, F ~func(C, T0, T1, T2, T3, T4, T5, T6, T7, T
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Uneitherize10 converts a function with 10 parameters returning a [GRA] into a function with 10 parameters returning a tuple.
|
||||
// The first parameter is considered to be the context [C].
|
||||
func Uneitherize10[GRA ~func(C) GIOA, F ~func(C, 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, C, R any](f func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) GRA) F {
|
||||
return func(c C, t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8, t9 T9) (R, error) {
|
||||
return E.UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9)(c)())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user