From e7c03c1ab4de85e7a700d2eafaebd37f4607c51f Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 6 Jun 2007 17:40:09 +0000 Subject: working on tensor contractions --- lib/Data/Packed/Internal/Vector.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Data/Packed/Internal/Vector.hs') diff --git a/lib/Data/Packed/Internal/Vector.hs b/lib/Data/Packed/Internal/Vector.hs index 6ed9339..36d5df7 100644 --- a/lib/Data/Packed/Internal/Vector.hs +++ b/lib/Data/Packed/Internal/Vector.hs @@ -35,6 +35,8 @@ instance (Storable a, RealFloat a) => Storable (Complex a) where -- poke p (a :+ b) = pokeArray (castPtr p) [a,b] -- ---------------------------------------------------------------------- +on f g = \x y -> f (g x) (g y) + (//) :: x -> (x -> y) -> y infixl 0 // (//) = flip ($) -- cgit v1.2.3