[m-users.] Possiblt stupid list question....
Volker Wysk
post at volker-wysk.de
Wed Dec 22 06:31:32 AEDT 2021
Am Dienstag, dem 21.12.2021 um 20:27 +0100 schrieb Volker Wysk:
> Am Dienstag, dem 21.12.2021 um 20:16 +0100 schrieb Volker Wysk:
> > Am Dienstag, dem 21.12.2021 um 16:42 +0000 schrieb Sean Charles (emacstheviking):
> > > Hi Zoltan,
> > > I already had:
> > >
> > > :- type rop
> > > ---> t(string)
> > > ; tnl(string)
> > > ; nl
> > > ; tab(list(rop))
> > > ; rops(list(rop)).
> > >
> > > By adding a new type constructor, which I have done,
> > >
> > > ; seq(string, list())
> >
> > Those are called "data constructors", at least in Haskell. Since data is what's being constructed, not a type.
>
> .... And something like "list" is a type constructor (again, speaking of Haskell, but it should be the same in Mercury). It takes a type (such as int) as an argument and constructs a type (such as list(int)).
.... And if I had read Zoltans response before answering you, I wouldn't have told the same again. :)
Bye, Volker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20211221/38b38ed4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20211221/38b38ed4/attachment.sig>
More information about the users
mailing list