| Copyright | (C) 2012-16 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Trustworthy |
| Language | Haskell2010 |
Control.Lens.Each
Contents
Description
Each
class Each s t a b | s -> a, t -> b, s b -> t, t a -> s where Source #
Extract each element of a (potentially monomorphic) container.
Notably, when applied to a tuple, this generalizes both to arbitrary homogeneous tuples.
>>>(1,2,3) & each *~ 10(10,20,30)
It can also be used on monomorphic containers like Text or ByteString .
>>>over each Char.toUpper ("hello"^.Text.packed)"HELLO"
>>>("hello","world") & each.each %~ Char.toUpper("HELLO","WORLD")
Minimal complete definition
Nothing
Methods
each :: Traversal s t a b Source #
each :: (Traversable g, s ~ g a, t ~ g b) => Traversal s t a b Source #
Instances
each::TraversalByteStringByteStringWord8Word8
Instance details
Defined in Control.Lens.Each
Methods
each :: Traversal ByteString ByteString a b Source #
each::TraversalByteStringByteStringWord8Word8
Instance details
Defined in Control.Lens.Each
Methods
each :: Traversal ByteString ByteString a b Source #
each:: (RealFloata,RealFloatb) =>Traversal(Complexa) (Complexb) a b
each:: (Unboxa,Unboxb) =>Traversal(Vectora) (Vectorb) a b
each:: (Storablea,Storableb) =>Traversal(Vectora) (Vectorb) a b
each:: (Prima,Primb) =>Traversal(Vectora) (Vectorb) a b
each::Traversal(Eithera a) (Eitherb b) a b
Since: 4.18
each:: (Ixi,IArrayUArraya,IArrayUArrayb) =>Traversal(Arrayi a) (Arrayi b) a b
each::Ixi =>Traversal(Arrayi a) (Arrayi b) a b
each::Traversal(HashMapc a) (HashMapc b) a b
each::Traversal(a,a,a) (b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a) (b,b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a,a) (b,b,b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a,a,a) (b,b,b,b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a,a,a,a) (b,b,b,b,b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a,a,a,a,a) (b,b,b,b,b,b,b,b) a b
Instance details
Defined in Control.Lens.Each
each::Traversal(a,a,a,a,a,a,a,a,a) (b,b,b,b,b,b,b,b,b) a b
Instance details
Defined in Control.Lens.Each