View the value pointed to by a
Getter or
Lens or the
result of folding over all the results of a
Fold or
Traversal that points at a monoidal values.
This is the same operation as
view with the arguments flipped.
The fixity and semantics are such that subsequent field accesses can
be performed with (
.).
>>> (a,b)^._2
b
>>> ("hello","world")^._2
"world"
>>> import Data.Complex
>>> ((0, 1 :+ 2), 3)^._1._2.to magnitude
2.23606797749979
(^.) :: s -> Getter s a -> a
(^.) :: Monoid m => s -> Fold s m -> m
(^.) :: s -> Iso' s a -> a
(^.) :: s -> Lens' s a -> a
(^.) :: Monoid m => s -> Traversal' s m -> m