[Haskell-beginners] Product/tuple type vs. ...
Galaxy Being
borgauf at gmail.com
Tue Mar 16 19:34:26 UTC 2021
Reading this
<https://www.cefns.nau.edu/~edo/Classes/CS396_WWW/Misc_docs/Haskell.html>
I'm a bit confused but think I understand what is meant by a *product
*or *tuple
*type constructor such as
data Point a b = Pt a b
Because Point has no "logical or," (|) of more than one possible value set
such as
data Color = Red | Green | Blue
it is automatically a tuple type? Also, it has no possible "consing" --
does that play a role?
data Things a = T1 a (Things a) | T2 a (Things a) | LastT a
Things is also parameterized just like Point, but, again, Things is not a
tuple type for the reasons above, e.g., just having one parameterized
constructor means automatically a tuple type, right?
LB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210316/5c2924c7/attachment.html>
More information about the Beginners
mailing list