[m-users.] Possiblt stupid list question....

Sean Charles (emacstheviking) objitsu at gmail.com
Wed Dec 22 06:43:12 AEDT 2021


I needed telling it seems, don’t hold back…

:D


> On 21 Dec 2021, at 19:31, Volker Wysk <post at volker-wysk.de> wrote:
> 
> 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/38400176/attachment-0001.html>


More information about the users mailing list