Created
December 5, 2020 00:31
-
-
Save piq9117/5bdcb8fa5c20395c34641fbf3f21299e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
intersperseVec :: a -> Vector a -> Vector a | |
intersperseVec sep vec = V.cons ( V.head vec ) | |
$ foldr (\v accum -> V.cons sep $ V.cons v accum) V.empty ( V.tail vec ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment