@@ -132,12 +132,15 @@ module Data.Vector.Unboxed (
132132 -- ** Zipping
133133 zipWith , zipWith3 , zipWith4 , zipWith5 , zipWith6 ,
134134 izipWith , izipWith3 , izipWith4 , izipWith5 , izipWith6 ,
135+ -- *** Zipping tuples
136+ -- $zip
135137 zip , zip3 , zip4 , zip5 , zip6 ,
136138
137139 -- ** Monadic zipping
138140 zipWithM , izipWithM , zipWithM_ , izipWithM_ ,
139141
140142 -- ** Unzipping
143+ -- $unzip
141144 unzip , unzip3 , unzip4 , unzip5 , unzip6 ,
142145
143146 -- * Working with predicates
@@ -977,6 +980,26 @@ iforM_ = G.iforM_
977980-- Zipping
978981-- -------
979982
983+ -- $zip
984+ --
985+ -- Following functions could be used to construct vector of tuples
986+ -- from tuple of vectors. This operation is done in /O(1)/ time and
987+ -- will share underlying buffers.
988+ --
989+ -- Note that variants from "Data.Vector.Generic" doesn't have this
990+ -- property.
991+
992+ -- $unzip
993+ --
994+ -- Following functions could be used to access underlying
995+ -- representation of array of tuples. They convert array to tuple of
996+ -- arrays. This operation is done in /O(1)/ time and will share
997+ -- underlying buffers.
998+ --
999+ -- Note that variants from "Data.Vector.Generic" doesn't have this
1000+ -- property.
1001+
1002+
9801003-- | /O(min(m,n))/ Zip two vectors with the given function.
9811004zipWith :: (Unbox a , Unbox b , Unbox c )
9821005 => (a -> b -> c ) -> Vector a -> Vector b -> Vector c
0 commit comments