+
+
+-- | Remove an element of the given vector.
+--
+-- Examples:
+--
+-- >>> let b = D3 1 2 3
+-- >>> delete b 1 :: D2 Int
+-- D2 1 3
+--
+delete :: (Vector v a, Vector w a, Dim v ~ S (Dim w)) => v a -> Int -> w a
+delete v1 idx =
+ fromList $ (lhalf ++ rhalf')
+ where
+ (lhalf, rhalf) = splitAt idx (toList v1)
+ rhalf' = tail rhalf