-- | A function which takes any kind of Optic which might
-- be focused on zero subparts and returns Just the first
-- subpart or else Nothing.
--
-- @_@
-- preview :: Traversal s s a a -> (s -> Maybe a)
-- @_@
preview :: Optic (->) (K (First a)) s s a a -> s -> Maybe a
preview f = getFirst . getK . f (K . First . Just)
preview :: Optic (->) (K (First a)) s s a a -> s -> Maybe a
preview f = getFirst . getK . f (K . First . Just)
preview f = getFirst . getK . f (K . First . Just)