coordHead :: Lens' (Vector n a) a
coordHead = lens getter setter
  where
    getter :: Vector n a -> a
    getter (SingleVector a) = a
    getter (AddVector a _) = a
    setter :: Vector n a -> a -> Vector n a
    setter (SingleVector _) a = SingleVector a
    setter (AddVector _ n) a = AddVector a n
coordHead :: Lens' (Vector n a) a
coordHead = lens getter setter
  where
    getter :: Vector n a -> a
    getter (SingleVector a) = a
    getter (AddVector a _) = a
    setter :: Vector n a -> a -> Vector n a
    setter (SingleVector _) a = SingleVector a
    setter (AddVector _ n) a = AddVector a n
coordHead = lens getter setter
  where
    getter :: Vector n a -> a
    getter (SingleVector a) = a
    getter (AddVector a _) = a
    setter :: Vector n a -> a -> Vector n a
    setter (SingleVector _) a = SingleVector a
    setter (AddVector _ n) a = AddVector a n