HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleoptics-core-0.4.1.1Haskell2010

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, …