Re: [Chicken-users] coops

2011-01-19 Thread Christian Kellermann
Dear Sandro, * sch...@uni-potsdam.de [110119 03:09]: > Is there a reason why is a subclass of ? This reflects the way scheme sees lists, which are build of pairs: (equal? (cons 1 (cons 2 (cons 3 (cons 4 (cons 5 '()) (list 1 2 3 4 5)) => #t Does this help? Christian __

Re: [Chicken-users] coops

2011-01-19 Thread schugk
This reflects the way scheme sees lists, which are build of pairs: Jeha, i know. A list is a pair, but a pair is not a list. Therefore a list should be a subclass of pair. (Ok, for '() we have ). And the other point is, that i can not specialized generic procedures for and . Maybe it is i

Re: [Chicken-users] coops

2011-01-19 Thread Thomas Chust
2011/1/19 : > [...] > Jeha, i know. A list is a pair, but a pair is not a list. Therefore a list > should be a subclass of pair. (Ok, for '() we have ). > [...] Hello, that is wrong, and you even give the reason why it's wrong yourself: A list is either a pair or the empty list. Hence the single

Re: [Chicken-users] coops

2011-01-19 Thread schugk
Hi, all pairs are subtypes of the type of lists 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). Perhaps I have misunderstood you. I am not that firm with types and i am a little confuse

Re: [Chicken-users] coops

2011-01-19 Thread Christian Kellermann
* sch...@uni-potsdam.de [110119 15:35]: > Hi, > > >all pairs are subtypes of the type of lists > > 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). Perhaps I have misunderstood you. I am not

Re: [Chicken-users] coops

2011-01-19 Thread Thomas Chust
2011/1/19 : > [...] > 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 hie

[Chicken-users] invalid typedef syntax using bind

2011-01-19 Thread Vilson Vieira
Hello, I'm trying to apply bind to some C struct like: (bind "typedef struct foo { int x; } foo;") I got the "invalid typedef syntax" error. I replaced the typedef form with something like: (bind "struct foo { int x; }; typedef struct foo foo;") It works but now I'm getting a C error "inva

Re: [Chicken-users] invalid typedef syntax using bind

2011-01-19 Thread Felix
From: Vilson Vieira Subject: [Chicken-users] invalid typedef syntax using bind Date: Thu, 20 Jan 2011 02:37:26 -0200 > Hello, > > I'm trying to apply bind to some C struct like: > > (bind "typedef struct foo { int x; } foo;") > > I got the "invalid typedef syntax" error. > > I replaced the ty