optics-core-0.4.1: Optics as an abstract interface: core definitions
Safe Haskell None
Language Haskell2010

Optics.Internal.Fold

Description

Internal implementation details of folds.

This module is intended for internal use only, and may change without warning in subsequent releases.

Synopsis

Documentation

foldVL__ :: ( Bicontravariant p, Traversing p) => ( forall f. Applicative f => (a -> f u) -> s -> f v) -> Optic__ p i i s t a b Source #

Internal implementation of foldVL .

folded__ :: ( Bicontravariant p, Traversing p, Foldable f) => Optic__ p i i (f a) (f b) a b Source #

Internal implementation of folded .

foldring__ :: ( Bicontravariant p, Traversing p) => ( forall f. Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Optic__ p i i s t a b Source #

Internal implementation of foldring .

getLeftmost :: Leftmost a -> Maybe a Source #

Extract the Leftmost element. This will fairly eagerly determine that it can return Just the moment it sees any element at all.

getRightmost :: Rightmost a -> Maybe a Source #

Extract the Rightmost element. This will fairly eagerly determine that it can return Just the moment it sees any element at all.