MCPcopy Create free account

hub / github.com/Primetalk/goio / functions

Functions426 in github.com/Primetalk/goio

↓ 2 callersFunctionFlatMap
FlatMap converts all values of a slice using the provided function. As the function returns slices, all of them are appended to a single long slice.
slice/slice.go:24
↓ 2 callersFunctionFlatten
Flatten simplifies option of option to just Option[A].
option/option.go:68
↓ 2 callersFunctionFold
Fold pattern matches Either with two given pattern match handlers
either/either.go:39
↓ 2 callersFunctionFoldLeft
FoldLeft aggregates stream in a more simple way than StateFlatMap.
stream/stream.go:486
↓ 2 callersFunctionFoldToGoResult
FoldToGoResult converts a stream into a stream of go results. All go results will be non-error except probably the last one.
stream/stream.go:170
↓ 2 callersFunctionForEach
ForEach calls the provided callback after IO is completed.
io/io.go:242
↓ 2 callersFunctionFromChannel
FromChannel reads a single value from the channel
io/channels.go:42
↓ 2 callersFunctionFromStepResult
FromStepResult constructs a stream from an IO that returns StepResult.
stream/construct.go:80
↓ 2 callersFunctionGetLeft
GetLeft returns left if it's defined.
either/either.go:48
↓ 2 callersFunctionGroupBy
GroupBy groups elements by a function that returns a key.
slice/slice.go:122
↓ 2 callersFunctionGroupByEval
GroupByEval collects group by a user-provided key (which is evaluated as IO). Whenever a new key is encountered, the previous group is emitted. When t
stream/stream.go:378
↓ 2 callersFunctionIndexOf
IndexOf returns the index of the first occurrence of a in the slice or -1 if not found.
slice/slice.go:257
↓ 2 callersFunctionIsEmpty
IsEmpty checks whether the option is empty.
option/option.go:90
↓ 2 callersFunctionIsEqualTo
IsEqualTo compares two arguments for equality.
fun/predicate.go:7
↓ 2 callersFunctionMap
Map applies a function to the value inside option if any.
option/option.go:24
↓ 2 callersFunctionMapToStrings
MapToStrings converts stream of bytes to strings.
text/read.go:90
↓ 2 callersFunctionMemoize
Memoize returns a function that will remember the original function in a map. It's thread safe, however, not super performant.
fun/memoize.go:7
↓ 2 callersFunctionNewStreamEvent
(value A)
stream/stream_event.go:12
↓ 2 callersFunctionNotify
Notify starts a separate thread that will call the given callback after the specified time.
io/time.go:44
↓ 2 callersFunctionPairBoth
PairBoth returns both parts of the pair.
fun/pair.go:19
↓ 2 callersFunctionPairSequentially
PairSequentially runs two IOs sequentially and returns both results.
io/parallel.go:52
↓ 2 callersFunctionReadByteChunks
ReadByteChunks reads chunks from the reader.
text/read.go:16
↓ 2 callersFunctionReadLines
ReadLines reads text file line-by-line. If there is a last line that is not terminated by '\n', it is ignored.
text/read.go:98
↓ 2 callersFunctionRecoverToLog
RecoverToLog in case of error just logs it.
fun/errors.go:30
↓ 2 callersFunctionRepeat
Repeat appends the same stream infinitely.
stream/lengthy.go:6
↓ 2 callersFunctionRetry
Retry performs the same operation a few times based on the retry strategy.
io/error_handling.go:40
↓ 2 callersFunctionRetryS
RetryS performs the same operation a few times based on the retry strategy. Also returns the last state of the error-handling strategy.
io/error_handling.go:57
↓ 2 callersFunctionSleep
Sleep makes the IO sleep the specified time.
io/time.go:11
↓ 2 callersFunctionSplitBySeparator
SplitBySeparator splits byte-chunk stream by the given separator.
text/read.go:38
↓ 2 callersFunctionStart
Start will start the IO in a separate go-routine (actually in the global unbounded execution context). It'll establish a channel with callbacks, so th
io/fiber.go:97
↓ 2 callersFunctionStateFlatMapWithFinishAndFailureHandling
StateFlatMapWithFinishAndFailureHandling maintains state along the way. When the source stream finishes, it invokes onFinish with the last state. If t
stream/stream.go:254
↓ 2 callersFunctionThroughExecutionContextUnordered
ThroughExecutionContextUnordered runs a stream of tasks through an ExecutionContext. The order of results is not preserved! This operation recovers Go
stream/pool.go:179
↓ 2 callersFunctionToChannel
ToChannel saves the value to the channel
io/channels.go:10
↓ 2 callersFunctionToChannels
ToChannels sends each stream element to every given channel. Failure or completion of the stream leads to closure of all channels. TODO: Send failure
stream/channels.go:29
↓ 2 callersFunctionUnfoldGoResult
UnfoldGoResult represents GoResult back to ordinary IO.
io/error_handling.go:23
↓ 2 callersFunctionWrapf
Wrapf wraps an error with additional context information
io/io.go:229
↓ 2 callersFunctionZipWithIndex
ZipWithIndex prepends the index to each element.
slice/slice.go:247
↓ 2 callersMethodcloseOutputIfNeeded
()
stream/pool.go:96
↓ 1 callersFunctionAddSeparatorAfterEachElement
AddSeparatorAfterEachElement adds a separator after each stream element
stream/mangling.go:4
↓ 1 callersFunctionAfterTimeout
AfterTimeout sleeps the given time and then starts the other IO.
io/time.go:62
↓ 1 callersFunctionAndThen
AndThen appends another stream after the end of the first one.
stream/stream.go:125
↓ 1 callersFunctionAppendAll
AppendAll concatenates all slices.
slice/slice.go:108
↓ 1 callersFunctionAppendToSlice
AppendToSlice executes the stream and appends it's results to the slice.
stream/execution.go:59
↓ 1 callersMethodBoth
Pair.Both returns both parts of the pair.
fun/pair.go:24
↓ 1 callersFunctionBoundedExecutionContextResource
BoundedExecutionContextResource returns a resource that is a bounded execution context.
resource/closable_io.go:17
↓ 1 callersFunctionCastAsInterface
CastAsInterface casts a value of an arbitrary type as interface {}.
fun/cast.go:6
↓ 1 callersFunctionClosableFlatMap
ClosableFlatMap flatmaps the closable. Allows to construct have more than one resource in scope.
resource/resource.go:74
↓ 1 callersFunctionClosableIOTransform
ClosableIOTransform transforms a closable of io closable to just io closable.
resource/resource.go:110
↓ 1 callersMethodCloseReceiverNormally
()
stream/backpressure_channels.go:105
↓ 1 callersMethodCloseReceiverWithError
(err error)
stream/backpressure_channels.go:100
↓ 1 callersFunctionCollect
Collect collects all element from the stream and for each element invokes the provided function
stream/execution.go:18
↓ 1 callersFunctionConcurrentlyFirst
ConcurrentlyFirst - runs all IOs in parallel. returns the very first result. TODO: after obtaining result - cancel the other IOs.
io/parallel.go:31
↓ 1 callersFunctionCount
Count counts the number of elements that satisfy the given predicate.
slice/slice.go:84
↓ 1 callersFunctionCreateSleeps
(count int)
resource/bounded_ec_test.go:13
↓ 1 callersFunctionCurry
Curry takes a function that has two arguments and returns a function with two argument lists.
fun/fun.go:29
↓ 1 callersFunctionDropWhile
DropWhile removes the beginning of the stream so that the new stream starts with an element that falsifies the predicate.
stream/lengthy.go:59
↓ 1 callersFunctionEmitMany
EmitMany returns a stream with all the given values.
stream/construct.go:44
↓ 1 callersFunctionExists
Exists returns a predicate on slices. The predicate is true if there is an element that satisfy the given element-wise predicate. It's false for an em
slice/slice.go:195
↓ 1 callersFunctionFilterNot
Filter leaves in the stream only the elements that do not satisfy the given predicate.
stream/stream.go:305
↓ 1 callersFunctionFlatMap
FlatMap allows to add another resource to scope. Both will be released in reverse order.
resource/resource.go:101
↓ 1 callersFunctionFlatMap
FlatMap converts an internal value if it is present using the provided function.
option/option.go:58
↓ 1 callersFunctionFlatMapPipe
FlatMapPipe creates a pipe that flatmaps one stream through the provided function.
stream/stream.go:207
↓ 1 callersFunctionFoldLeft
FoldLeft folds all values in the slice using the combination function.
slice/slice.go:33
↓ 1 callersFunctionFoldLeftEval
FoldLeftEval aggregates stream in a more simple way than StateFlatMap. It takes `zero` as the initial accumulator value and then combines one element
stream/stream.go:470
↓ 1 callersFunctionForEach
ForEach executes the given function for each element of the slice.
slice/slice.go:225
↓ 1 callersFunctionForEach
ForEach invokes a simple function for each element of the stream.
stream/execution.go:38
↓ 1 callersFunctionFromBackpressureChannel
FromBackpressureChannel forms a stream[A] that will be consumed by `f`. The result of `f` will be used to report back failures and finish signals. thi
stream/backpressure_channels.go:218
↓ 1 callersFunctionFromClosableIO
FromClosableIO constructs a new resource from some value that itself supports method Close.
resource/closable_io.go:12
↓ 1 callersFunctionFromConstantGoResult
FromConstantGoResult converts an existing GoResult value into a fake IO. NB! This is not for normal delayed IO execution!
io/goresult.go:32
↓ 1 callersFunctionFromSlice
FromSlice constructs a stream from the slice.
stream/construct.go:49
↓ 1 callersFunctionGenerate
Generate constructs an infinite stream of values using the production function.
stream/construct.go:58
↓ 1 callersFunctionGetRight
GetRight returns left if it's defined.
either/either.go:57
↓ 1 callersFunctionGroupBy
GroupBy collects group by a user-provided key. Whenever a new key is encountered, the previous group is emitted. When the original stream finishes, th
stream/stream.go:336
↓ 1 callersFunctionGroupByMap
GroupByMap is a convenience function that groups and then maps the subslices.
slice/slice.go:138
↓ 1 callersFunctionGroupByMapCount
GroupByMapCount for each key counts how often it is seen.
slice/slice.go:144
↓ 1 callersFunctionGrouped
Grouped partitions the slice into groups of the given size. Last partition might be smaller.
slice/slice.go:170
↓ 1 callersMethodHappyPathReceive
HappyPathReceive forms a stream of a happy path.
stream/backpressure_channels.go:121
↓ 1 callersFunctionHead
Head returns head of the slice. panics with ErrHeadOfEmptySlice when slice is empty.
slice/slice.go:320
↓ 1 callersFunctionHeadAndTail
HeadAndTail returns the very first element of the stream and the rest of the stream.
stream/execution.go:83
↓ 1 callersFunctionIOFuncToGoResult
IOFuncToGoResult converts a function that returns IO to a function that will return GoResult.
io/goresult.go:38
↓ 1 callersFunctionIdentity
Identity function returns the given value unchanged.
fun/fun.go:38
↓ 1 callersFunctionIntersection
Intersection leaves only elements that are both in as and as2.
slice/slice.go:293
↓ 1 callersFunctionIsDefined
IsDefined checks whether the option contains a value.
option/option.go:85
↓ 1 callersFunctionJoinFiberAsGoResult
JoinFiberAsGoResult joins the fiber synchronously and returns GoResult.
io/fiber.go:129
↓ 1 callersFunctionJoinWithTimeout
JoinWithTimeout joins the given fiber and waits no more than the given duration.
io/fiber.go:134
↓ 1 callersFunctionKeys
Keys returns keys of the map.
maps/maps.go:4
↓ 1 callersFunctionLen
Len is a pipe that returns a stream of 1 element that is the count of elements of the original stream.
stream/stream.go:324
↓ 1 callersFunctionLiftFunc
LiftFunc wraps the result of function into IO.
io/io.go:149
↓ 1 callersFunctionMap
Map maps the resource value using the provided conversion function.
resource/resource.go:93
↓ 1 callersFunctionMapConst
MapConst ignores the result and replaces it with the given constant.
io/io.go:105
↓ 1 callersFunctionMapKeys
MapKeys converts original keys to new keys.
maps/maps.go:30
↓ 1 callersFunctionMapSlice
MapSlice converts each element of the slice inside IO[[]A] using the provided function that cannot fail.
io/io_slice.go:6
↓ 1 callersFunctionMapStringToBytes
MapStringToBytes converts stream of strings to stream of byte chunks.
text/write.go:31
↓ 1 callersFunctionMapValues
MapValues converts values in the map using the provided function.
maps/maps.go:44
↓ 1 callersFunctionMax
Max - returns the maximum value. See https://go.dev/blog/intro-generics
fun/numbers.go:23
↓ 1 callersFunctionMemoize
Memoize returns a function that will remember the original function in a map. It's thread safe, however, not super performant.
io/memoize.go:9
↓ 1 callersFunctionMerge
Merge combines two maps. Function `combine` is invoked when the same key is available in both maps.
maps/maps.go:13
↓ 1 callersFunctionNats
(count int)
io/common_test.go:36
↓ 1 callersFunctionNats
Nats returns an infinite stream of ints starting from 1.
stream/construct.go:85
↓ 1 callersFunctionNewGoResult
NewGoResult constructs a GoResult.
io/goresult.go:11
← previousnext →101–200 of 426, ranked by callers