Hi Alex,

>> I would expect:
>>
>> : (make (link 1) (chain 2))
>> -> (1 . 2)

> In this respect, 'chain' is analogous, it simply processes the cell
> arguments, and does not preserve any CDRs, as it cannot not know if
> later more elements will be added with 'link' or 'chain'.

Yes, I think the behaviour above is quite simple, natural, logical,
practical and efficient:-D

>> I guess this is not currently achievable using 'make'?
>
> The following would do that
>
>    : (make (link 1) (conc (made) 2))
>    -> (1 . 2)
>
> but is rather inefficient because it traverses the whole (made) list to
> concatenate the '2'.

I see.  Thanks.  I guess that destructively messing with the make
environment in general breaks it, if it is not the last operation on it:

: (make (link 1) (conc (made) 2) (chain (conc 3 4)))
-> (1 . 2)

> Anyway, this seems to be a useful feature. It basically just needs the
> exchange of two lines in 'doChain()' in "src/subr.c":
>
>    do {
>       if (isCell(y = EVAL(car(x)))) {
>          *Env.make = y;
>          do
>
>    ->
>
>    do {
>       *Env.make = y = EVAL(car(x));
>       if (isCell(y)) {
>          do
>
>
> Should I keep that change?

Yes please;-)

Thank you,

Tomas
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to