MCPcopy Create free account

hub / github.com/Primetalk/goio / functions

Functions426 in github.com/Primetalk/goio

↓ 50 callersFunctionLift
Lift[A] constructs an IO[A] from a constant value.
io/io.go:144
↓ 40 callersFunctionMap
Map converts the IO[A] result using the provided function that cannot fail.
io/io.go:100
↓ 36 callersFunctionUnsafeIO
(t *testing.T, ioa io.IO[A])
stream/common_test.go:30
↓ 33 callersFunctionNewPair
NewPair constructs the pair.
fun/pair.go:10
↓ 33 callersFunctionUnsafeRunSync
UnsafeRunSync runs the given IO[A] synchronously and returns the result.
io/io.go:28
↓ 28 callersFunctionFlatMap
FlatMap converts the result of IO[A] using a function that itself returns an IO[B]. It'll fail if any of IO[A] or IO[B] fail.
io/io.go:111
↓ 26 callersFunctionPure
Pure[A] constructs an IO[A] from a function that cannot fail.
io/io.go:70
↓ 20 callersFunctionRange
Range starts at `from` and progresses until `to` exclusive.
slice/numbers.go:14
↓ 17 callersFunctionHead
Head returns the first element of the stream. It'll fail if the stream is empty.
stream/execution.go:102
↓ 17 callersFunctionToSlice
ToSlice executes the stream and collects all results to a slice.
stream/execution.go:74
↓ 15 callersFunctionLift
Lift returns a stream of one value.
stream/construct.go:29
↓ 15 callersFunctionMap
Map converts values of the stream.
stream/stream.go:105
↓ 15 callersFunctionNewStepResult
NewStepResult constructs StepResult that has one value.
stream/stream.go:27
↓ 14 callersFunctionFold
Fold performs different calculations based on whether IO[A] failed or succeeded.
io/io.go:162
↓ 14 callersFunctionMap
Map converts all values of a slice using the provided function.
slice/slice.go:14
↓ 14 callersFunctionTake
Take cuts the stream after n elements.
stream/lengthy.go:11
↓ 13 callersFunctionEval
Eval[A] constructs an IO[A] from a simple function that might fail. If there is panic in the function, it's recovered from and represented as an error
io/io.go:42
↓ 12 callersFunctionNewStepResultEmpty
NewStepResultEmpty constructs an empty StepResult.
stream/stream.go:37
↓ 11 callersFunctionAndThen
AndThen runs the first IO, ignores it's result and then runs the second one.
io/io.go:137
↓ 11 callersFunctionEmpty
Empty returns an empty stream.
stream/construct.go:9
↓ 10 callersFunctionFromPureEffect
FromPureEffect constructs IO from the simplest function signature.
io/io.go:53
↓ 9 callersFunctionDrainAll
DrainAll executes the stream and throws away all values.
stream/execution.go:46
↓ 9 callersFunctionEval
Eval returns a stream of one value that is the result of IO.
stream/construct.go:22
↓ 9 callersFunctionMapEval
MapEval maps the values of the stream. The provided function returns an IO.
stream/stream.go:86
↓ 9 callersFunctionParallel
Parallel starts the given IOs in Go routines and waits for all results.
io/parallel.go:24
↓ 9 callersFunctionSleepA
SleepA sleeps and then returns the constant value.
io/time.go:18
↓ 9 callersFunctionSome
Some constructs an option with value.
option/option.go:17
↓ 9 callersFunctionStateFlatMapWithFinish
StateFlatMapWithFinish maintains state along the way. When the source stream finishes, it invokes onFinish with the last state.
stream/stream.go:226
↓ 9 callersFunctionUnsafeIO
(t *testing.T, ioa io.IO[A])
io/common_test.go:23
↓ 8 callersFunctionNewResource
NewResource constructs a resource given two functions - acquire and release.
resource/resource.go:49
↓ 8 callersFunctionRecoverToErrorVar
RecoverToErrorVar recovers and places the recovered error into the given variable
fun/errors.go:11
↓ 8 callersFunctionToSet
ToSet converts a slice to a set.
slice/slice.go:113
↓ 7 callersFunctionBoundedExecutionContext
BoundedExecutionContext creates an execution context that will execute tasks concurrently. Simultaneously there could be as many as size executions. I
io/execution_context.go:70
↓ 7 callersFunctionFanOut
FanOut distributes the same element to all handlers. Stream failure is also distribured to all handlers.
stream/stream.go:444
↓ 7 callersFunctionFlatMap
FlatMap constructs a new stream by concatenating all substreams, produced by f from elements of the original stream.
stream/stream.go:152
↓ 7 callersFunctionFold
Fold transforms all possible values of OptionA using two provided functions.
option/option.go:34
↓ 7 callersFunctionFromUnit
FromUnit consturcts IO[fun.Unit] from a simple function that might fail.
io/io.go:61
↓ 7 callersFunctionUnsafeIOExpectError
(t *testing.T, expected error, ioa io.IO[A])
stream/common_test.go:36
↓ 7 callersFunctionUse
Use is a only way to access the resource instance. It guarantees that the resource instance will be closed after use regardless of the failure/success
resource/resource.go:26
↓ 6 callersMethodClose
()
resource/closable_io.go:7
↓ 6 callersFunctionFromChannel
FromChannel constructs a stream that reads from the given channel until the channel is open. When channel is closed, the stream is also closed.
stream/channels.go:50
↓ 6 callersFunctionNats
Nats return slice []int{1, 2, ..., n}
slice/numbers.go:23
↓ 6 callersFunctionRecover
Recover handles a potential error from IO. It does not fail itself.
io/error_handling.go:28
↓ 6 callersFunctionSum
Sum sums numbers.
slice/numbers.go:6
↓ 6 callersFunctionSum
Sum is a pipe that returns a stream of 1 element that is sum of all elements of the original stream.
stream/stream.go:312
↓ 5 callersFunctionAndThenLazy
AndThenLazy appends another stream. The other stream is constructed lazily.
stream/stream.go:130
↓ 5 callersFunctionContains
Contains creates a predicate that will check if an element is in this set.
set/set.go:7
↓ 5 callersFunctionDelay
Delay[A] wraps a function that will then return an IO.
io/io.go:34
↓ 5 callersFunctionEmit
Emit returns a stream of a single element
stream/construct.go:39
↓ 5 callersFunctionLast
Last keeps track of the current element of the stream and returns it when the stream completes.
stream/execution.go:116
↓ 5 callersFunctionLiftMany
LiftMany returns a stream with all the given values.
stream/construct.go:34
↓ 5 callersFunctionLiftPair
LiftPair[A] constructs an IO from constant values.
io/io.go:17
↓ 5 callersFunctionUnsafeIOExpectError
(t *testing.T, expected error, ioa io.IO[A])
io/common_test.go:29
↓ 5 callersFunctionUnsafeStreamToSlice
(t *testing.T, stm stream.Stream[A])
stream/common_test.go:26
↓ 4 callersFunctionCloseChannel
CloseChannel is an IO that closes the given channel.
io/channels.go:28
↓ 4 callersFunctionFireAndForget
FireAndForget runs the given IO in a go routine and ignores the result It uses Fiber underneath.
io/fiber.go:103
↓ 4 callersFunctionGet
Get is an unsafe function that unwraps the value from the option.
option/option.go:73
↓ 4 callersFunctionIgnore
Ignore throws away the result of IO.
io/io.go:270
↓ 4 callersFunctionMapErr
MapErr maps the result of IO[A] using a function that might fail.
io/io.go:77
↓ 4 callersFunctionMapPipe
MapPipe creates a pipe that maps one stream through the provided function.
stream/stream.go:110
↓ 4 callersFunctionObtainResult
ObtainResult executes continuation until final result is obtained.
io/continuation.go:25
↓ 4 callersFunctionPairOfChannelsToPipe
PairOfChannelsToPipe - takes two channels that are being used to talk to some external process and convert them into a single pipe. It first starts a
stream/channels.go:68
↓ 4 callersFunctionRetryStrategyMaxCount
RetryStrategyMaxCount is a strategy that retries n times immediately.
io/error_handling.go:75
↓ 4 callersFunctionSetSize
SetSize returns the size of the set.
set/set.go:15
↓ 4 callersFunctionStreamFold
StreamFold performs arbitrary processing of a stream's single step result.
stream/stream.go:55
↓ 4 callersFunctionUnfoldGoResult
UnfoldGoResult converts a stream of GoResults back to normal stream. On the first encounter of Error, the stream fails. default value for `onFailure`
stream/stream.go:192
↓ 3 callersFunctionAsync
Async[A] constructs an IO given a function that will eventually call a callback. Internally this function creates a channel and blocks on it until the
io/async.go:8
↓ 3 callersMethodClose
Closes the fiber and stops sending callbacks. After closing, the respective go routine may complete This is not Cancel, it does not send any signals t
io/fiber.go:23
↓ 3 callersFunctionConstUnit
ConstUnit creates a function that will ignore it's Unit input and return the specified value.
fun/fun.go:15
↓ 3 callersFunctionFilter
Filter filters slice values.
slice/slice.go:48
↓ 3 callersFunctionFilter
Filter leaves in the stream only the elements that satisfy the given predicate.
stream/stream.go:286
↓ 3 callersFunctionFilterNot
FilterNot filters slice values inverting the condition.
slice/slice.go:59
↓ 3 callersFunctionFinally
Finally runs the finalizer regardless of the success of the IO. In case finalizer fails as well, the second error is printed to log.
io/io.go:251
↓ 3 callersFunctionFlatten
Flatten simplifies a slice of slices to just a slice.
slice/slice.go:95
↓ 3 callersFunctionFoldToGoResult
FoldToGoResult converts either value or error to go result typically it should never fail.
io/error_handling.go:10
↓ 3 callersFunctionForEach
ForEach runs the given function on the value if it's available.
option/option.go:78
↓ 3 callersFunctionForall
Forall returns a predicate on slices. The predicate is true if all elements satisfy the given element-wise predicate. It's true for an empty slice.
slice/slice.go:211
↓ 3 callersFunctionHeadTail
HeadTail returns head, tail. panics with ErrHeadOfEmptySlice when slice is empty.
slice/slice.go:309
↓ 3 callersFunctionIsLeft
IsLeft checks whether the provided Either is left or not.
either/either.go:29
↓ 3 callersMethodJoin
Join waits for results of the fiber. When fiber completes, this IO will complete and return the result. After this fiber is closed, all join IOs fail
io/fiber.go:18
↓ 3 callersFunctionMeasureDuration
MeasureDuration captures the wall time that was needed to evaluate the given IO.
io/parallel.go:78
↓ 3 callersFunctionMin
Min - returns the minimum value. See https://go.dev/blog/intro-generics
fun/numbers.go:14
↓ 3 callersFunctionReverse
Reverse creates a new slice with elements reversed.
slice/slice.go:277
↓ 3 callersFunctionRunSync
RunSync is the same as UnsafeRunSync but returns GoResult[A].
io/goresult.go:25
↓ 3 callersMethodSend
Send receives readiness signal from `back`. If ready, sends data to `data`.
stream/backpressure_channels.go:73
↓ 3 callersFunctionSequence
Sequence takes a slice of IOs and returns an IO that will contain a slice of results. It'll fail if any of the internal computations fail.
io/io.go:193
↓ 3 callersFunctionSliding
Sliding splits the provided slice into windows. Each window will have the given size. The first window starts from offset = 0. Each consecutive window
slice/slice.go:153
↓ 3 callersFunctionThroughExecutionContext
ThroughExecutionContext runs a stream of tasks through an ExecutionContext. NB! This operation recovers GoResults. This will lead to lost of good elem
stream/pool.go:169
↓ 3 callersFunctionThroughPipeEval
ThroughPipeEval runs the given stream through pipe that is returned by the provided pipeIO.
stream/pipe.go:23
↓ 3 callersFunctionToChannel
ToChannel sends all stream elements to the given channel. When stream is completed, channel is closed. The IO blocks until the stream is exhausted. If
stream/channels.go:16
↓ 3 callersFunctionToStreamEvent
ToStreamEvent converts the given stream to a stream of StreamEvents. Each normal element will become a StreamEvent with data. On a failure or finish a
stream/stream_event.go:27
↓ 3 callersFunctionUnfold
Unfold constructs an infinite stream of values using the production function.
stream/construct.go:66
↓ 2 callersFunctionClosableMap
ClosableMap is an internal function to map closable using the provided function.
resource/resource.go:66
↓ 2 callersFunctionCollect
Collect runs through the slice, executes the given function and only keeps good returned values.
slice/slice.go:182
↓ 2 callersFunctionConcatPipes
ConcatPipes connects two pipes into one.
stream/pipe.go:45
↓ 2 callersFunctionContains
(substring string)
option/option_test.go:23
↓ 2 callersFunctionCreateSleeps
(count int)
io/parallel_test.go:12
↓ 2 callersFunctionDrop
Drop removes initial n elements.
slice/slice.go:272
↓ 2 callersFunctionDrop
Drop skips n elements in the stream.
stream/lengthy.go:29
↓ 2 callersFunctionFilter
Filter leaves the value inside option only if predicate is true.
option/option.go:44
next →1–100 of 426, ranked by callers