[Haskell-beginners] Monads
Patrick LeBoutillier
patrick.leboutillier at gmail.com
Wed Mar 2 15:11:47 CET 2011
Hi,
> my questions are:
> 1. is this substitution ok?
> 2. is []a = [a]?
> 3. is []b = [b]?
>
> if 2. and 3. are valid then the following is obtained:
> fmap::(a->b)->[a]->[b]
> which is the same as map type and therefore: fmap = map. QED.
>
> Can you please answer questions 2 and 3 above?
Yes, they are equivalent. Actually both forms are valid Haskell:
a :: [Int]
a = [1]
a' :: [] Int
a' = [1]
Patrick
>
> Thank you
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
--
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada
More information about the Beginners
mailing list