chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: list vs dotted-list


From: John Cowan
Subject: Re: [Chicken-users] Re: list vs dotted-list
Date: Thu, 11 Nov 2010 13:03:43 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

Yi DAI scripsit:

> I did not mean to somehow make it //impossible// to build a list step by
> step, in contract, I mean use `cons' for the //sole// purpose of building a
> list step by step. In other words, give the type obj -> list(obj) ->
> list(obj) to `cons', and eliminate the possibility of using it to build a
> dotted pair from the beginning. Because whenever I write a function intended
> to handle a list, I foresee the disaster caused by passing a dotted-list to
> it on purpose or not by a user. Thus my question is, if we do so, will we
> lose something cute of Scheme?

Unless we discard the whole idea of pairs as independently usable data
structures, we would need two constructors, say 'cons' and 'make-pair'.
As long as it is possible to construct a pair whose cdr is not a list,
the possibility of dotted-lists still exists.

-- 
Her he asked if O'Hare Doctor tidings sent from far     John Cowan
coast and she with grameful sigh him answered that      http://ccil.org/~cowan
O'Hare Doctor in heaven was. Sad was the man that word  address@hidden
to hear that him so heavied in bowels ruthful. All
she there told him, ruing death for friend so young,    James Joyce, Ulysses
algate sore unwilling God's rightwiseness to withsay.   "Oxen of the Sun"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]