Documentation
¶
Overview ¶
Prism is an optic used to select part of a sum type.
Index ¶
- func AsTraversal[R ~func(func(A) HKTA) func(S) HKTS, S, A, HKTS, HKTA any](fof func(S) HKTS, fmap func(HKTA, func(A) S) HKTS) func(Prism[S, A]) R
- func Compose[S, A, B any](ab Prism[A, B]) func(Prism[S, A]) Prism[S, B]
- func IMap[S, A, B any](ab func(A) B, ba func(B) A) func(Prism[S, A]) Prism[S, B]
- func Set[S, A any](a A) func(Prism[S, A]) func(S) S
- type Prism
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsTraversal ¶
func AsTraversal[R ~func(func(A) HKTA) func(S) HKTS, S, A, HKTS, HKTA any]( fof func(S) HKTS, fmap func(HKTA, func(A) S) HKTS, ) func(Prism[S, A]) R
AsTraversal converts a prism to a traversal
Types ¶
Click to show internal directories.
Click to hide internal directories.