Andrew Coppin <andrewcop...@btinternet.com> writes:

> Now here's an interesting thought. Haskell has "algebraic data
> types". "Algebraic" because they are sum types of product types (or,
> equivilently, product types of sum types). Now I don't actually know
> what those terms mean,

The quick rule to remember this that the size of the resulting types
correspond to the arithmetic names.  I.e.

 data Sum a b = A a | B b -- values = values in a + values in b
 data Prod a b = P a b    -- values = values in a * values in b

I guess this makes [X] an exponential type, although I don't remember
seeing that term :-)

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to