[plt-scheme] Re: Newbie question: picking the right data structure

From: Gregg Williams (spamme at innerpaths.net)
Date: Sun Jul 19 18:07:46 EDT 2009

Thanks to both of you for your quick responses--they pointed me in the
right direction, and I was able to move on to doing some useful
programming. I had forgotten about set!, largely because I thought it
had been deprecated in R6RS. Also, the mention of threads led me to
read some documentation that was new to me.

Thanks again for the help! The community here is much nicer than your
Common Lisp counterparts, which is one of the main reasons I went with
Scheme instead.


On Jul 18, 7:03 am, Gregg Williams <spa... at innerpaths.net> wrote:
> Hi! I'm fairly new at Scheme, though I have written a number of
> programs in the functional style with no problem. However, I'm hitting
> a blind spot and would like somebody's opinion.
>
> I want to use Scheme to create an interactive environment for
> exploring a data set (i.e., from the command line). Each datum is
> represented by a string that I use as a key, so I will be building up
> various named lists of strings and adding to them.
>
> Here's my problem: I can't seem to find a good way to add strings to a
> list identified by a fixed variable name. I can't seem to use "define"
> to overwrite the variable with a new list. I could use a vector, but
> that would waste a lot of space if I made all vectors long enough for
> practical purposes. I looked into using mutable lists, but
> destructively splicing a second list onto the list connected to my
> veritable name has repercussions.
>
> Am I missing something obvious, or do I have to just choose one of
> these options and deal with the consequences? Thanks for your help.
> _________________________________________________
>   For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.