traversal

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compose

func Compose[
	S, A, B, HKTS, HKTA, HKTB any](ab G.Traversal[A, B, HKTA, HKTB]) func(sa G.Traversal[S, A, HKTS, HKTA]) G.Traversal[S, B, HKTS, HKTB]

Compose composes two traversables

func Fold

func Fold[S, A any](sa G.Traversal[S, A, C.Const[A, S], C.Const[A, A]]) func(S) A

Fold maps each target to a `Monoid` and combines the result

func FoldMap

func FoldMap[M, S, A any](f func(A) M) func(sa G.Traversal[S, A, C.Const[M, S], C.Const[M, A]]) func(S) M

FoldMap maps each target to a `Monoid` and combines the result

func GetAll

func GetAll[S, A any](s S) func(sa G.Traversal[S, A, C.Const[[]A, S], C.Const[[]A, A]]) []A

GetAll gets all the targets of a traversal

func Id

func Id[S, A any]() G.Traversal[S, S, A, A]

Id is the identity constructor of a traversal

func Modify

func Modify[S, A any](f func(A) A) func(sa G.Traversal[S, A, S, A]) func(S) S

Modify applies a transformation function to a traversal

func Set

func Set[S, A any](a A) func(sa G.Traversal[S, A, S, A]) func(S) S

Set sets a constant value for all values of the traversal

Types

This section is empty.

Jump to

Keyboard shortcuts

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