io

package
v1.0.152 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Now = G.Now[IO[time.Time]]()

Now returns the current timestamp

Functions

func After added in v1.0.97

func After[A any](timestamp time.Time) func(IO[A]) IO[A]

After creates an operation that passes after the given timestamp

func Ap

func Ap[B, A any](ma IO[A]) func(IO[func(A) B]) IO[B]

func ApFirst

func ApFirst[A, B any](second IO[B]) func(IO[A]) IO[A]

ApFirst combines two effectful actions, keeping only the result of the first.

func ApS added in v1.0.107

func ApS[S1, S2, T any](
	setter func(T) func(S1) S2,
	fa IO[T],
) func(IO[S1]) IO[S2]

ApS attaches a value to a context [S1] to produce a context [S2] by considering the context and the value concurrently

func ApSecond

func ApSecond[A, B any](second IO[B]) func(IO[A]) IO[B]

ApSecond combines two effectful actions, keeping only the result of the second.

func ApplicativeMonoid

func ApplicativeMonoid[A any](m M.Monoid[A]) M.Monoid[IO[A]]

func ApplySemigroup

func ApplySemigroup[A any](s S.Semigroup[A]) S.Semigroup[IO[A]]

func Bind added in v1.0.107

func Bind[S1, S2, T any](
	setter func(T) func(S1) S2,
	f func(S1) IO[T],
) func(IO[S1]) IO[S2]

Bind attaches the result of a computation to a context [S1] to produce a context [S2]

func BindTo added in v1.0.107

func BindTo[S1, T any](
	setter func(T) S1,
) func(IO[T]) IO[S1]

BindTo initializes a new state [S1] from a value [T]

func Chain

func Chain[A, B any](f func(A) IO[B]) func(IO[A]) IO[B]

Chain composes computations in sequence, using the return value of one computation to determine the next computation.

func ChainFirst

func ChainFirst[A, B any](f func(A) IO[B]) func(IO[A]) IO[A]

ChainFirst composes computations in sequence, using the return value of one computation to determine the next computation and keeping only the result of the first.

func ChainTo

func ChainTo[A, B any](fb IO[B]) func(IO[A]) IO[B]

ChainTo composes computations in sequence, ignoring the return value of the first computation

func Delay added in v1.0.97

func Delay[A any](delay time.Duration) func(IO[A]) IO[A]

Delay creates an operation that passes in the value after some delay

func Eq

func Eq[A any](e EQ.Eq[A]) EQ.Eq[IO[A]]

Eq implements the equals predicate for values contained in the IO monad

func Flap added in v1.0.39

func Flap[B, A any](a A) func(IO[func(A) B]) IO[B]

func FromStrictEquals added in v1.0.145

func FromStrictEquals[A comparable]() EQ.Eq[IO[A]]

FromStrictEquals constructs an [EQ.Eq] from the canonical comparison function

func Functor added in v1.0.145

func Functor[A, B any]() functor.Functor[A, B, IO[A], IO[B]]

Functor returns the monadic operations for IO

func Let added in v1.0.107

func Let[S1, S2, T any](
	setter func(T) func(S1) S2,
	f func(S1) T,
) func(IO[S1]) IO[S2]

Let attaches the result of a computation to a context [S1] to produce a context [S2]

func LetTo added in v1.0.107

func LetTo[S1, S2, T any](
	setter func(T) func(S1) S2,
	b T,
) func(IO[S1]) IO[S2]

LetTo attaches the a value to a context [S1] to produce a context [S2]

func Logf

func Logf[A any](prefix string) func(A) IO[any]

Logf constructs a logger function that can be used with ChainXXXIOK the string prefix contains the format string for the log value

func Logger

func Logger[A any](loggers ...*log.Logger) func(string) func(A) IO[any]

Logger constructs a logger function that can be used with ChainXXXIOK

func Map

func Map[A, B any](f func(A) B) func(fa IO[A]) IO[B]

func MapTo

func MapTo[A, B any](b B) func(IO[A]) IO[B]

func Monad added in v1.0.113

func Monad[A, B any]() monad.Monad[A, B, IO[A], IO[B], IO[func(A) B]]

Monad returns the monadic operations for IO

func Pointed added in v1.0.145

func Pointed[A any]() pointed.Pointed[A, IO[A]]

Pointed returns the monadic operations for IO

func Printf added in v1.0.6

func Printf[A any](prefix string) func(A) IO[any]

Printf constructs a printer function that can be used with ChainXXXIOK the string prefix contains the format string for the log value

func TraverseArray

func TraverseArray[A, B any](f func(A) IO[B]) func([]A) IO[[]B]

TraverseArray applies a function returning an IO to all elements in an array and the transforms this into an IO of that array

func TraverseArraySeq added in v1.0.132

func TraverseArraySeq[A, B any](f func(A) IO[B]) func([]A) IO[[]B]

TraverseArraySeq applies a function returning an IO to all elements in an array and the transforms this into an IO of that array

func TraverseArrayWithIndex added in v1.0.29

func TraverseArrayWithIndex[A, B any](f func(int, A) IO[B]) func([]A) IO[[]B]

TraverseArrayWithIndex applies a function returning an IO to all elements in an array and the transforms this into an IO of that array

func TraverseArrayWithIndexSeq added in v1.0.132

func TraverseArrayWithIndexSeq[A, B any](f func(int, A) IO[B]) func([]A) IO[[]B]

TraverseArrayWithIndexSeq applies a function returning an IO to all elements in an array and the transforms this into an IO of that array

func TraverseRecord

func TraverseRecord[K comparable, A, B any](f func(A) IO[B]) func(map[K]A) IO[map[K]B]

TraverseRecord applies a function returning an IO to all elements in a record and the transforms this into an IO of that record

func TraverseRecordSeq added in v1.0.132

func TraverseRecordSeq[K comparable, A, B any](f func(A) IO[B]) func(map[K]A) IO[map[K]B]

TraverseRecord applies a function returning an IO to all elements in a record and the transforms this into an IO of that record

func TraverseRecordWithIndeSeq added in v1.0.132

func TraverseRecordWithIndeSeq[K comparable, A, B any](f func(K, A) IO[B]) func(map[K]A) IO[map[K]B]

TraverseRecordWithIndexSeq applies a function returning an IO to all elements in a record and the transforms this into an IO of that record

func TraverseRecordWithIndex added in v1.0.29

func TraverseRecordWithIndex[K comparable, A, B any](f func(K, A) IO[B]) func(map[K]A) IO[map[K]B]

TraverseRecordWithIndex applies a function returning an IO to all elements in a record and the transforms this into an IO of that record

func TraverseTuple1 added in v1.0.7

func TraverseTuple1[F1 ~func(A1) IO[T1], A1, T1 any](f1 F1) func(T.Tuple1[A1]) IO[T.Tuple1[T1]]

TraverseTuple1 converts a [T.Tuple1[IO[T]]] into a [IO[T.Tuple1[T1]]]

func TraverseTuple10 added in v1.0.7

func TraverseTuple10[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], F6 ~func(A6) IO[T6], F7 ~func(A7) IO[T7], F8 ~func(A8) IO[T8], F9 ~func(A9) IO[T9], F10 ~func(A10) IO[T10], A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5, f6 F6, f7 F7, f8 F8, f9 F9, f10 F10) func(T.Tuple10[A1, A2, A3, A4, A5, A6, A7, A8, A9, A10]) IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]

TraverseTuple10 converts a [T.Tuple10[IO[T]]] into a [IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]]

func TraverseTuple2 added in v1.0.7

func TraverseTuple2[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], A1, A2, T1, T2 any](f1 F1, f2 F2) func(T.Tuple2[A1, A2]) IO[T.Tuple2[T1, T2]]

TraverseTuple2 converts a [T.Tuple2[IO[T]]] into a [IO[T.Tuple2[T1, T2]]]

func TraverseTuple3 added in v1.0.7

func TraverseTuple3[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], A1, A2, A3, T1, T2, T3 any](f1 F1, f2 F2, f3 F3) func(T.Tuple3[A1, A2, A3]) IO[T.Tuple3[T1, T2, T3]]

TraverseTuple3 converts a [T.Tuple3[IO[T]]] into a [IO[T.Tuple3[T1, T2, T3]]]

func TraverseTuple4 added in v1.0.7

func TraverseTuple4[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], A1, A2, A3, A4, T1, T2, T3, T4 any](f1 F1, f2 F2, f3 F3, f4 F4) func(T.Tuple4[A1, A2, A3, A4]) IO[T.Tuple4[T1, T2, T3, T4]]

TraverseTuple4 converts a [T.Tuple4[IO[T]]] into a [IO[T.Tuple4[T1, T2, T3, T4]]]

func TraverseTuple5 added in v1.0.7

func TraverseTuple5[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], A1, A2, A3, A4, A5, T1, T2, T3, T4, T5 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5) func(T.Tuple5[A1, A2, A3, A4, A5]) IO[T.Tuple5[T1, T2, T3, T4, T5]]

TraverseTuple5 converts a [T.Tuple5[IO[T]]] into a [IO[T.Tuple5[T1, T2, T3, T4, T5]]]

func TraverseTuple6 added in v1.0.7

func TraverseTuple6[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], F6 ~func(A6) IO[T6], A1, A2, A3, A4, A5, A6, T1, T2, T3, T4, T5, T6 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5, f6 F6) func(T.Tuple6[A1, A2, A3, A4, A5, A6]) IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]

TraverseTuple6 converts a [T.Tuple6[IO[T]]] into a [IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]]

func TraverseTuple7 added in v1.0.7

func TraverseTuple7[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], F6 ~func(A6) IO[T6], F7 ~func(A7) IO[T7], A1, A2, A3, A4, A5, A6, A7, T1, T2, T3, T4, T5, T6, T7 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5, f6 F6, f7 F7) func(T.Tuple7[A1, A2, A3, A4, A5, A6, A7]) IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]

TraverseTuple7 converts a [T.Tuple7[IO[T]]] into a [IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]]

func TraverseTuple8 added in v1.0.7

func TraverseTuple8[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], F6 ~func(A6) IO[T6], F7 ~func(A7) IO[T7], F8 ~func(A8) IO[T8], A1, A2, A3, A4, A5, A6, A7, A8, T1, T2, T3, T4, T5, T6, T7, T8 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5, f6 F6, f7 F7, f8 F8) func(T.Tuple8[A1, A2, A3, A4, A5, A6, A7, A8]) IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]

TraverseTuple8 converts a [T.Tuple8[IO[T]]] into a [IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]]

func TraverseTuple9 added in v1.0.7

func TraverseTuple9[F1 ~func(A1) IO[T1], F2 ~func(A2) IO[T2], F3 ~func(A3) IO[T3], F4 ~func(A4) IO[T4], F5 ~func(A5) IO[T5], F6 ~func(A6) IO[T6], F7 ~func(A7) IO[T7], F8 ~func(A8) IO[T8], F9 ~func(A9) IO[T9], A1, A2, A3, A4, A5, A6, A7, A8, A9, T1, T2, T3, T4, T5, T6, T7, T8, T9 any](f1 F1, f2 F2, f3 F3, f4 F4, f5 F5, f6 F6, f7 F7, f8 F8, f9 F9) func(T.Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9]) IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]

TraverseTuple9 converts a [T.Tuple9[IO[T]]] into a [IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]]

func WithLock added in v1.0.50

func WithLock[A any](lock IO[context.CancelFunc]) func(fa IO[A]) IO[A]

WithLock executes the provided IO operation in the scope of a lock

func WithResource added in v1.0.66

func WithResource[
	R, A, ANY any](onCreate IO[R], onRelease func(R) IO[ANY]) func(func(R) IO[A]) IO[A]

WithResource constructs a function that creates a resource, then operates on it and then releases the resource

Types

type IO

type IO[A any] func() A

IO represents a synchronous computation that cannot fail refer to [https://andywhite.xyz/posts/2021-01-27-rte-foundations/#ioltagt] for more details

func Bracket added in v1.0.50

func Bracket[A, B, ANY any](
	acquire IO[A],
	use func(A) IO[B],
	release func(A, B) IO[ANY],
) IO[B]

Bracket makes sure that a resource is cleaned up in the event of an error. The release action is called regardless of whether the body action returns and error or not.

func Defer

func Defer[A any](gen func() IO[A]) IO[A]

Defer creates an IO by creating a brand new IO via a generator function, each time

func Do added in v1.0.107

func Do[S any](
	empty S,
) IO[S]

Bind creates an empty context of type [S] to be used with the Bind operation

func Flatten

func Flatten[A any](mma IO[IO[A]]) IO[A]

func FromIO

func FromIO[A any](a IO[A]) IO[A]

func FromImpure

func FromImpure(f func()) IO[any]

FromImpure converts a side effect without a return value into a side effect that returns any

func MakeIO

func MakeIO[A any](f func() A) IO[A]

func Memoize

func Memoize[A any](ma IO[A]) IO[A]

Memoize computes the value of the provided IO monad lazily but exactly once

func MonadAp

func MonadAp[B, A any](mab IO[func(A) B], ma IO[A]) IO[B]

func MonadApFirst

func MonadApFirst[A, B any](first IO[A], second IO[B]) IO[A]

MonadApFirst combines two effectful actions, keeping only the result of the first.

func MonadApSecond

func MonadApSecond[A, B any](first IO[A], second IO[B]) IO[B]

MonadApSecond combines two effectful actions, keeping only the result of the second.

func MonadChain

func MonadChain[A, B any](fa IO[A], f func(A) IO[B]) IO[B]

MonadChain composes computations in sequence, using the return value of one computation to determine the next computation.

func MonadChainFirst

func MonadChainFirst[A, B any](fa IO[A], f func(A) IO[B]) IO[A]

MonadChainFirst composes computations in sequence, using the return value of one computation to determine the next computation and keeping only the result of the first.

func MonadChainTo

func MonadChainTo[A, B any](fa IO[A], fb IO[B]) IO[B]

MonadChainTo composes computations in sequence, ignoring the return value of the first computation

func MonadFlap added in v1.0.39

func MonadFlap[B, A any](fab IO[func(A) B], a A) IO[B]

func MonadMap

func MonadMap[A, B any](fa IO[A], f func(A) B) IO[B]

func MonadMapTo

func MonadMapTo[A, B any](fa IO[A], b B) IO[B]

func MonadOf

func MonadOf[A any](a A) IO[A]

func MonadTraverseArray

func MonadTraverseArray[A, B any](tas []A, f func(A) IO[B]) IO[[]B]

func MonadTraverseArraySeq added in v1.0.132

func MonadTraverseArraySeq[A, B any](tas []A, f func(A) IO[B]) IO[[]B]

func MonadTraverseRecord

func MonadTraverseRecord[K comparable, A, B any](tas map[K]A, f func(A) IO[B]) IO[map[K]B]

func MonadTraverseRecordSeq added in v1.0.132

func MonadTraverseRecordSeq[K comparable, A, B any](tas map[K]A, f func(A) IO[B]) IO[map[K]B]

func Of

func Of[A any](a A) IO[A]

func Retrying

func Retrying[A any](
	policy R.RetryPolicy,
	action func(R.RetryStatus) IO[A],
	check func(A) bool,
) IO[A]

Retrying will retry the actions according to the check policy

policy - refers to the retry policy action - converts a status into an operation to be executed check - checks if the result of the action needs to be retried

func SequenceArray

func SequenceArray[A any](tas []IO[A]) IO[[]A]

SequenceArray converts an array of IO to an IO of an array

func SequenceArraySeq added in v1.0.132

func SequenceArraySeq[A any](tas []IO[A]) IO[[]A]

SequenceArraySeq converts an array of IO to an IO of an array

func SequenceRecord

func SequenceRecord[K comparable, A any](tas map[K]IO[A]) IO[map[K]A]

SequenceRecord converts a record of IO to an IO of a record

func SequenceRecordSeq added in v1.0.132

func SequenceRecordSeq[K comparable, A any](tas map[K]IO[A]) IO[map[K]A]

SequenceRecordSeq converts a record of IO to an IO of a record

func SequenceT1

func SequenceT1[T1 any](
	t1 IO[T1],
) IO[T.Tuple1[T1]]

SequenceT1 converts 1 [IO[T]] into a [IO[T.Tuple1[T1]]]

func SequenceT10 added in v1.0.7

func SequenceT10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
	t6 IO[T6],
	t7 IO[T7],
	t8 IO[T8],
	t9 IO[T9],
	t10 IO[T10],
) IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]

SequenceT10 converts 10 [IO[T]] into a [IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]]

func SequenceT2

func SequenceT2[T1, T2 any](
	t1 IO[T1],
	t2 IO[T2],
) IO[T.Tuple2[T1, T2]]

SequenceT2 converts 2 [IO[T]] into a [IO[T.Tuple2[T1, T2]]]

func SequenceT3

func SequenceT3[T1, T2, T3 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
) IO[T.Tuple3[T1, T2, T3]]

SequenceT3 converts 3 [IO[T]] into a [IO[T.Tuple3[T1, T2, T3]]]

func SequenceT4

func SequenceT4[T1, T2, T3, T4 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
) IO[T.Tuple4[T1, T2, T3, T4]]

SequenceT4 converts 4 [IO[T]] into a [IO[T.Tuple4[T1, T2, T3, T4]]]

func SequenceT5 added in v1.0.7

func SequenceT5[T1, T2, T3, T4, T5 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
) IO[T.Tuple5[T1, T2, T3, T4, T5]]

SequenceT5 converts 5 [IO[T]] into a [IO[T.Tuple5[T1, T2, T3, T4, T5]]]

func SequenceT6 added in v1.0.7

func SequenceT6[T1, T2, T3, T4, T5, T6 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
	t6 IO[T6],
) IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]

SequenceT6 converts 6 [IO[T]] into a [IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]]

func SequenceT7 added in v1.0.7

func SequenceT7[T1, T2, T3, T4, T5, T6, T7 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
	t6 IO[T6],
	t7 IO[T7],
) IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]

SequenceT7 converts 7 [IO[T]] into a [IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]]

func SequenceT8 added in v1.0.7

func SequenceT8[T1, T2, T3, T4, T5, T6, T7, T8 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
	t6 IO[T6],
	t7 IO[T7],
	t8 IO[T8],
) IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]

SequenceT8 converts 8 [IO[T]] into a [IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]]

func SequenceT9 added in v1.0.7

func SequenceT9[T1, T2, T3, T4, T5, T6, T7, T8, T9 any](
	t1 IO[T1],
	t2 IO[T2],
	t3 IO[T3],
	t4 IO[T4],
	t5 IO[T5],
	t6 IO[T6],
	t7 IO[T7],
	t8 IO[T8],
	t9 IO[T9],
) IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]

SequenceT9 converts 9 [IO[T]] into a [IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]]

func SequenceTuple1 added in v1.0.7

func SequenceTuple1[T1 any](t T.Tuple1[IO[T1]]) IO[T.Tuple1[T1]]

SequenceTuple1 converts a [T.Tuple1[IO[T]]] into a [IO[T.Tuple1[T1]]]

func SequenceTuple10 added in v1.0.7

func SequenceTuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 any](t T.Tuple10[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5], IO[T6], IO[T7], IO[T8], IO[T9], IO[T10]]) IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]

SequenceTuple10 converts a [T.Tuple10[IO[T]]] into a [IO[T.Tuple10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]]]

func SequenceTuple2 added in v1.0.7

func SequenceTuple2[T1, T2 any](t T.Tuple2[IO[T1], IO[T2]]) IO[T.Tuple2[T1, T2]]

SequenceTuple2 converts a [T.Tuple2[IO[T]]] into a [IO[T.Tuple2[T1, T2]]]

func SequenceTuple3 added in v1.0.7

func SequenceTuple3[T1, T2, T3 any](t T.Tuple3[IO[T1], IO[T2], IO[T3]]) IO[T.Tuple3[T1, T2, T3]]

SequenceTuple3 converts a [T.Tuple3[IO[T]]] into a [IO[T.Tuple3[T1, T2, T3]]]

func SequenceTuple4 added in v1.0.7

func SequenceTuple4[T1, T2, T3, T4 any](t T.Tuple4[IO[T1], IO[T2], IO[T3], IO[T4]]) IO[T.Tuple4[T1, T2, T3, T4]]

SequenceTuple4 converts a [T.Tuple4[IO[T]]] into a [IO[T.Tuple4[T1, T2, T3, T4]]]

func SequenceTuple5 added in v1.0.7

func SequenceTuple5[T1, T2, T3, T4, T5 any](t T.Tuple5[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5]]) IO[T.Tuple5[T1, T2, T3, T4, T5]]

SequenceTuple5 converts a [T.Tuple5[IO[T]]] into a [IO[T.Tuple5[T1, T2, T3, T4, T5]]]

func SequenceTuple6 added in v1.0.7

func SequenceTuple6[T1, T2, T3, T4, T5, T6 any](t T.Tuple6[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5], IO[T6]]) IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]

SequenceTuple6 converts a [T.Tuple6[IO[T]]] into a [IO[T.Tuple6[T1, T2, T3, T4, T5, T6]]]

func SequenceTuple7 added in v1.0.7

func SequenceTuple7[T1, T2, T3, T4, T5, T6, T7 any](t T.Tuple7[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5], IO[T6], IO[T7]]) IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]

SequenceTuple7 converts a [T.Tuple7[IO[T]]] into a [IO[T.Tuple7[T1, T2, T3, T4, T5, T6, T7]]]

func SequenceTuple8 added in v1.0.7

func SequenceTuple8[T1, T2, T3, T4, T5, T6, T7, T8 any](t T.Tuple8[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5], IO[T6], IO[T7], IO[T8]]) IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]

SequenceTuple8 converts a [T.Tuple8[IO[T]]] into a [IO[T.Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]]]

func SequenceTuple9 added in v1.0.7

func SequenceTuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9 any](t T.Tuple9[IO[T1], IO[T2], IO[T3], IO[T4], IO[T5], IO[T6], IO[T7], IO[T8], IO[T9]]) IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]

SequenceTuple9 converts a [T.Tuple9[IO[T]]] into a [IO[T.Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]]]

func WithDuration added in v1.0.106

func WithDuration[A any](a IO[A]) IO[T.Tuple2[A, time.Duration]]

WithDuration returns an operation that measures the time.Duration

func WithTime added in v1.0.106

func WithTime[A any](a IO[A]) IO[T.Tuple3[A, time.Time, time.Time]]

WithTime returns an operation that measures the start and end time.Time of the operation

Directories

Path Synopsis
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.

Jump to

Keyboard shortcuts

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