[Top][All Lists]

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

Re: [Chicken-users] Replace an element in a list

From: Daniel Leslie
Subject: Re: [Chicken-users] Replace an element in a list
Date: Sat, 13 Dec 2014 18:33:37 -0800

There are setters for car and cdr, so let's say you're at a position where you want to replace the head of a list, you can then just do:

(set! (car some-list) some-value)


On Sat, Dec 13, 2014 at 3:59 PM, Bahman Movaqar <address@hidden> wrote:
What is the idiomatic way of replacing the nth element in a list
*without* mutating the list? Is the combination of "take" and
"take-right" the right way to do it?

Bahman Movaqar - -
PGP Key ID: 0x6AB5BD68 (

Chicken-users mailing list

reply via email to

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