A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/IBM/fp-go@v1.0.153/io below:

io package - github.com/IBM/fp-go/io - Go Packages

This section is empty.

Now returns the current timestamp

After creates an operation that passes after the given timestamp

func Ap[B, A any](ma IO[A]) func(IO[func(A) B]) IO[B]
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[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[A, B any](second IO[B]) func(IO[A]) IO[B]

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

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[S1, T any](
	setter func(T) S1,
) func(IO[T]) IO[S1]

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

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[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[A, B any](fb IO[B]) func(IO[A]) IO[B]

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

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

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

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

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

Functor returns the monadic operations for IO

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[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]

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

Logger constructs a logger function that can be used with ChainXXXIOK

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

Monad returns the monadic operations for IO

Pointed returns the monadic operations for IO

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

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[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[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[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[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[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[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[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

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

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[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[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[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[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[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[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[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[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]]]

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

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

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[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[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[S any](
	empty S,
) IO[S]

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

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

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

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

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

func MonadAp[B, A any](mab IO[func(A) B], ma IO[A]) IO[B]
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[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[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[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[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[B, A any](fab IO[func(A) B], a A) IO[B]
func MonadMap[A, B any](fa IO[A], f func(A) B) IO[B]
func MonadMapTo[A, B any](fa IO[A], b B) IO[B]
func MonadOf[A any](a A) IO[A]
func MonadTraverseArray[A, B any](tas []A, f func(A) IO[B]) IO[[]B]
func MonadTraverseArraySeq[A, B any](tas []A, f func(A) IO[B]) IO[[]B]
func MonadTraverseRecord[K comparable, A, B any](tas map[K]A, f func(A) IO[B]) IO[map[K]B]
func MonadTraverseRecordSeq[K comparable, A, B any](tas map[K]A, f func(A) IO[B]) IO[map[K]B]
func Of[A any](a A) 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[A any](tas []IO[A]) IO[[]A]

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

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

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

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

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

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

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]]]

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

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[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[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[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[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[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[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]]]

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

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]]]

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

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

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

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[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[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[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[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]]]

WithDuration returns an operation that measures the time.Duration

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4