+-- | Zip together two column matrices using the supplied function.
+--
+-- Examples:
+--
+-- >>> let c1 = fromList [[1],[2],[3]] :: Col3 Integer
+-- >>> let c2 = fromList [[4],[5],[6]] :: Col3 Integer
+-- >>> colzipwith (^) c1 c2
+-- ((1),(32),(729))
+--
+colzipwith :: Arity m
+ => (a -> a -> b)
+ -> Col m a
+ -> Col m a
+ -> Col m b
+colzipwith f c1 c2 =
+ construct lambda
+ where
+ lambda i j = f (c1 !!! (i,j)) (c2 !!! (i,j))
+
+