Haskell Matrix Library...
Henning Thielemann
lemming at henning-thielemann.de
Sun Jun 26 12:39:05 EDT 2005
On Tue, 14 Jun 2005, Bulat Ziganshin wrote:
> 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
... or a real valued matrix to a complex valued one.
More information about the Libraries
mailing list