summaryrefslogtreecommitdiff
path: root/lib/Data/Packed/Internal
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-06-25 17:34:09 +0000
committerAlberto Ruiz <aruiz@um.es>2007-06-25 17:34:09 +0000
commit2984d5cc1cedb1621f6fa8d9dda0c515441f92e1 (patch)
tree85e155bd77644c26e265996f9cfecd7de70e2450 /lib/Data/Packed/Internal
parent1871acb835b4fc164bcff3f6e7467884b87fbd0f (diff)
old tests passed
Diffstat (limited to 'lib/Data/Packed/Internal')
-rw-r--r--lib/Data/Packed/Internal/Vector.hs3
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
132liftVector :: (Storable a, Storable b) => (a-> b) -> Vector a -> Vector b
132liftVector f = fromList . map f . toList 133liftVector f = fromList . map f . toList
134
135liftVector2 :: (Storable a, Storable b, Storable c) => (a-> b -> c) -> Vector a -> Vector b -> Vector c
133liftVector2 f u v = fromList $ zipWith f (toList u) (toList v) 136liftVector2 f u v = fromList $ zipWith f (toList u) (toList v)