HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleoptics-core-0.4.2Haskell2010

Optics.Each.Core

This module defines the Each class, which provides an IxTraversal that extracts each element of a (potentially monomorphic) container.

Note that orphan instances for this class are defined in the Optics.Each module from optics-extra, so if you are not simply depending on optics you may wish to import that module instead.

  • 1 class

Each

1 declaration
classclass Each i s t a b | s -> i a, t -> i b, s b -> t, t a -> s where
#

Extract each element of a (potentially monomorphic) container.

Example1 expression
over each (*10) (1,2,3)(10,20,30)
Example1 expression
iover each (\i a -> a*10 + succ i) (1,2,3)(11,22,33)

Methods

Instances20Each, …