Haskell Matrix Library...
Bulat Ziganshin
bulatz at HotPOP.com
Tue Jun 14 08:00:58 EDT 2005
Hello Keean,
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
--
Best regards,
Bulat mailto:bulatz at HotPOP.com
More information about the Libraries
mailing list