diff options
Diffstat (limited to 'lib/Data/Packed/Internal/Vector.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Vector.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index f1addf4..ab93577 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs | |||
@@ -129,5 +129,8 @@ constant x n | isReal id x = scast $ constantR (scast x) n | |||
129 | | isComp id x = scast $ constantC (scast x) n | 129 | | isComp id x = scast $ constantC (scast x) n |
130 | | otherwise = constantG x n | 130 | | otherwise = constantG x n |
131 | 131 | ||
132 | liftVector :: (Storable a, Storable b) => (a-> b) -> Vector a -> Vector b | ||
132 | liftVector f = fromList . map f . toList | 133 | liftVector f = fromList . map f . toList |
134 | |||
135 | liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c | ||
133 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) | 136 | liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) |