Haskell Matrix Library...
bulatz at HotPOP.com
Tue Jun 14 08:00:58 EDT 2005
Tuesday, June 14, 2005, 3:54:08 PM, you wrote:
KS> class Functor m where
KS> fmap :: a -> b -> m a -> m b
KS> But the type of "mmap" is
KS> mmap :: e -> e -> Matrix a i e -> Matrix a i e
KS> in other words we map values to the same type, not a different type.
mmap should be
mmap :: (e -> e1) -> Matrix a i e -> Matrix a i e1
for example, we can map matrix of strings to matrix of its lengths
Bulat mailto:bulatz at HotPOP.com
More information about the Libraries