// Code generated by go generate; DO NOT EDIT. // This file was generated by robots at // 2023-07-14 13:19:40.5850892 +0200 CEST m=+0.008180901 package either // Eitherize0 converts a function with 0 parameters returning a tuple into a function with 0 parameters returning an Either // The inverse function is [Uneitherize0] func Eitherize0[F ~func() (R, error), R any](f F) func() Either[error, R] { return func() Either[error, R] { return TryCatchError(func() (R, error) { return f() }) } } // Uneitherize0 converts a function with 0 parameters returning an Either into a function with 0 parameters returning a tuple // The inverse function is [Eitherize0] func Uneitherize0[F ~func() Either[error, R], R any](f F) func() (R, error) { return func() (R, error) { return UnwrapError(f()) } } // Eitherize1 converts a function with 1 parameters returning a tuple into a function with 1 parameters returning an Either // The inverse function is [Uneitherize1] func Eitherize1[F ~func(T0) (R, error), T0, R any](f F) func(T0) Either[error, R] { return func(t0 T0) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0) }) } } // Uneitherize1 converts a function with 1 parameters returning an Either into a function with 1 parameters returning a tuple // The inverse function is [Eitherize1] func Uneitherize1[F ~func(T0) Either[error, R], T0, R any](f F) func(T0) (R, error) { return func(t0 T0) (R, error) { return UnwrapError(f(t0)) } } // Eitherize2 converts a function with 2 parameters returning a tuple into a function with 2 parameters returning an Either // The inverse function is [Uneitherize2] func Eitherize2[F ~func(T0, T1) (R, error), T0, T1, R any](f F) func(T0, T1) Either[error, R] { return func(t0 T0, t1 T1) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1) }) } } // Uneitherize2 converts a function with 2 parameters returning an Either into a function with 2 parameters returning a tuple // The inverse function is [Eitherize2] func Uneitherize2[F ~func(T0, T1) Either[error, R], T0, T1, R any](f F) func(T0, T1) (R, error) { return func(t0 T0, t1 T1) (R, error) { return UnwrapError(f(t0, t1)) } } // Eitherize3 converts a function with 3 parameters returning a tuple into a function with 3 parameters returning an Either // The inverse function is [Uneitherize3] func Eitherize3[F ~func(T0, T1, T2) (R, error), T0, T1, T2, R any](f F) func(T0, T1, T2) Either[error, R] { return func(t0 T0, t1 T1, t2 T2) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2) }) } } // Uneitherize3 converts a function with 3 parameters returning an Either into a function with 3 parameters returning a tuple // The inverse function is [Eitherize3] func Uneitherize3[F ~func(T0, T1, T2) Either[error, R], T0, T1, T2, R any](f F) func(T0, T1, T2) (R, error) { return func(t0 T0, t1 T1, t2 T2) (R, error) { return UnwrapError(f(t0, t1, t2)) } } // Eitherize4 converts a function with 4 parameters returning a tuple into a function with 4 parameters returning an Either // The inverse function is [Uneitherize4] func Eitherize4[F ~func(T0, T1, T2, T3) (R, error), T0, T1, T2, T3, R any](f F) func(T0, T1, T2, T3) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3) }) } } // Uneitherize4 converts a function with 4 parameters returning an Either into a function with 4 parameters returning a tuple // The inverse function is [Eitherize4] func Uneitherize4[F ~func(T0, T1, T2, T3) Either[error, R], T0, T1, T2, T3, R any](f F) func(T0, T1, T2, T3) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3) (R, error) { return UnwrapError(f(t0, t1, t2, t3)) } } // Eitherize5 converts a function with 5 parameters returning a tuple into a function with 5 parameters returning an Either // The inverse function is [Uneitherize5] func Eitherize5[F ~func(T0, T1, T2, T3, T4) (R, error), T0, T1, T2, T3, T4, R any](f F) func(T0, T1, T2, T3, T4) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4) }) } } // Uneitherize5 converts a function with 5 parameters returning an Either into a function with 5 parameters returning a tuple // The inverse function is [Eitherize5] func Uneitherize5[F ~func(T0, T1, T2, T3, T4) Either[error, R], T0, T1, T2, T3, T4, R any](f F) func(T0, T1, T2, T3, T4) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4)) } } // Eitherize6 converts a function with 6 parameters returning a tuple into a function with 6 parameters returning an Either // The inverse function is [Uneitherize6] func Eitherize6[F ~func(T0, T1, T2, T3, T4, T5) (R, error), T0, T1, T2, T3, T4, T5, R any](f F) func(T0, T1, T2, T3, T4, T5) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4, t5) }) } } // Uneitherize6 converts a function with 6 parameters returning an Either into a function with 6 parameters returning a tuple // The inverse function is [Eitherize6] func Uneitherize6[F ~func(T0, T1, T2, T3, T4, T5) Either[error, R], T0, T1, T2, T3, T4, T5, R any](f F) func(T0, T1, T2, T3, T4, T5) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4, t5)) } } // Eitherize7 converts a function with 7 parameters returning a tuple into a function with 7 parameters returning an Either // The inverse function is [Uneitherize7] func Eitherize7[F ~func(T0, T1, T2, T3, T4, T5, T6) (R, error), T0, T1, T2, T3, T4, T5, T6, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4, t5, t6) }) } } // Uneitherize7 converts a function with 7 parameters returning an Either into a function with 7 parameters returning a tuple // The inverse function is [Eitherize7] func Uneitherize7[F ~func(T0, T1, T2, T3, T4, T5, T6) Either[error, R], T0, T1, T2, T3, T4, T5, T6, R any](f F) func(T0, T1, T2, T3, T4, T5, T6) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4, t5, t6)) } } // Eitherize8 converts a function with 8 parameters returning a tuple into a function with 8 parameters returning an Either // The inverse function is [Uneitherize8] func Eitherize8[F ~func(T0, T1, T2, T3, T4, T5, T6, T7) (R, error), T0, T1, T2, T3, T4, T5, T6, T7, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4, t5, t6, t7) }) } } // Uneitherize8 converts a function with 8 parameters returning an Either into a function with 8 parameters returning a tuple // The inverse function is [Eitherize8] func Uneitherize8[F ~func(T0, T1, T2, T3, T4, T5, T6, T7) Either[error, R], T0, T1, T2, T3, T4, T5, T6, T7, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7)) } } // Eitherize9 converts a function with 9 parameters returning a tuple into a function with 9 parameters returning an Either // The inverse function is [Uneitherize9] func Eitherize9[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8) (R, error), T0, T1, T2, T3, T4, T5, T6, T7, T8, R any](f F) func(T0, T1, T2, T3, T4, T5, T6, T7, T8) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4, t5, t6, t7, t8) }) } } // Uneitherize9 converts a function with 9 parameters returning an Either into a function with 9 parameters returning a tuple // The inverse function is [Eitherize9] func Uneitherize9[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8) 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) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7, t8)) } } // Eitherize10 converts a function with 10 parameters returning a tuple into a function with 10 parameters returning an Either // The inverse function is [Uneitherize10] func Eitherize10[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) (R, error), 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) Either[error, R] { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8, t9 T9) Either[error, R] { return TryCatchError(func() (R, error) { return f(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) }) } } // Uneitherize10 converts a function with 10 parameters returning an Either into a function with 10 parameters returning a tuple // The inverse function is [Eitherize10] func Uneitherize10[F ~func(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) 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) (R, error) { return func(t0 T0, t1 T1, t2 T2, t3 T3, t4 T4, t5 T5, t6 T6, t7 T7, t8 T8, t9 T9) (R, error) { return UnwrapError(f(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9)) } }