[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] coops
From: |
Thomas Chust |
Subject: |
Re: [Chicken-users] coops |
Date: |
Wed, 19 Jan 2011 16:01:11 +0100 |
2011/1/19 <address@hidden>:
> [...]
> Then all pairs are lists? What about (cons 1 2)? I thought a list is a pair
> which cdr is a list (or the empty list -- exclude that case for a moment).
> [...]
Hello Sandro,
you're right, I neglected the case of pairs whose cdr is not a
list. So to be precise, the type hierarchy actually looks like this
(where A --> B means that B is a subtype of A):
some value --+--> pair --+--> degenerate list (cdr is not a list)
| |
| +--> non-empty list (cdr is a list)
| |
\--> list --+--> empty list
This means that neither pair nor list is a supertype of the other, but
the types are not disjuct, their intersection being exactly the type
of non-empty lists.
However, this fairly complex type hierarchy is apparently not what's
modelled by coops. Maybe it should be.
Ciao,
--
When C++ is your hammer, every problem looks like your thumb.
- [Chicken-users] coops, schugk, 2011/01/16
- Re: [Chicken-users] coops, Felix, 2011/01/17
- Re: [Chicken-users] coops, schugk, 2011/01/18
- Re: [Chicken-users] coops, Christian Kellermann, 2011/01/19
- Re: [Chicken-users] coops, schugk, 2011/01/19
- Re: [Chicken-users] coops, Thomas Chust, 2011/01/19
- Re: [Chicken-users] coops, schugk, 2011/01/19
- Re: [Chicken-users] coops, Christian Kellermann, 2011/01/19
- Re: [Chicken-users] coops, Felix, 2011/01/20
- Re: [Chicken-users] coops, John Cowan, 2011/01/20
- Re: [Chicken-users] coops,
Thomas Chust <=
- Re: [Chicken-users] coops, Felix, 2011/01/25