Discover Packages
github.com/IBM/fp-go/v2
optics
traversal
result
package
Version:
v2.2.21
Opens a new window with list of versions in this module.
Published: Feb 24, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Operator represents a function that transforms one Traversal into another.
It takes a Traversal[S, A] and produces a Traversal[S, B].
func Compose[
S, A, B any ](ab Traversal [A, B]) Operator[S, A, B]
Result represents a computation that may fail with an error.
type Traversal[S, A any ] = T .Traversal [S, A, Result[S], Result[A]]
Traversal represents an optic that focuses on zero or more values of type A within a structure S.
It's specialized for Result types, allowing traversal over successful values.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.