Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- (^?!) :: (HasCallStack, Is k An_AffineFold) => s -> Optic' k is s a -> a
Documentation
(^?!) :: (HasCallStack, Is k An_AffineFold) => s -> Optic' k is s a -> a infixl 8 Source #
Perform an *UNSAFE* head
of an affine fold assuming that it is there.
>>>
Left 4 ^?! _Left
4
>>>
"world" ^?! ix 3
'l'
>>>
[] ^?! _head
*** Exception: (^?!): empty affine fold ...
Since: 0.3