@@ -132,12 +132,15 @@ module Data.Vector.Unboxed (
132
132
-- ** Zipping
133
133
zipWith , zipWith3 , zipWith4 , zipWith5 , zipWith6 ,
134
134
izipWith , izipWith3 , izipWith4 , izipWith5 , izipWith6 ,
135
+ -- *** Zipping tuples
136
+ -- $zip
135
137
zip , zip3 , zip4 , zip5 , zip6 ,
136
138
137
139
-- ** Monadic zipping
138
140
zipWithM , izipWithM , zipWithM_ , izipWithM_ ,
139
141
140
142
-- ** Unzipping
143
+ -- $unzip
141
144
unzip , unzip3 , unzip4 , unzip5 , unzip6 ,
142
145
143
146
-- * Working with predicates
@@ -970,6 +973,26 @@ iforM_ = G.iforM_
970
973
-- Zipping
971
974
-- -------
972
975
976
+ -- $zip
977
+ --
978
+ -- Following functions could be used to construct vector of tuples
979
+ -- from tuple of vectors. This operation is done in /O(1)/ time and
980
+ -- will share underlying buffers.
981
+ --
982
+ -- Note that variants from "Data.Vector.Generic" doesn't have this
983
+ -- property.
984
+
985
+ -- $unzip
986
+ --
987
+ -- Following functions could be used to access underlying
988
+ -- representation of array of tuples. They convert array to tuple of
989
+ -- arrays. This operation is done in /O(1)/ time and will share
990
+ -- underlying buffers.
991
+ --
992
+ -- Note that variants from "Data.Vector.Generic" doesn't have this
993
+ -- property.
994
+
995
+
973
996
-- | /O(min(m,n))/ Zip two vectors with the given function.
974
997
zipWith :: (Unbox a , Unbox b , Unbox c )
975
998
=> (a -> b -> c ) -> Vector a -> Vector b -> Vector c
0 commit comments