Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-25 Thread David Storrs
On Thu, Feb 25, 2021 at 12:43 PM IF Karona wrote: > Your solution is so elegant. Thank you! > > >> PS Do I have the salutation right? Is it 'Hello, IF' or 'Hello, > Karona'? << > > You may call me Karona. Thank you for asking. :) > > Karona > > Cool, good to know and I'm glad you liked the

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-25 Thread IF Karona
Your solution is so elegant. Thank you! >> PS Do I have the salutation right? Is it 'Hello, IF' or 'Hello, Karona'? << You may call me Karona. Thank you for asking. :) Karona On Wed, Feb 24, 2021 at 11:14 PM David Storrs wrote: > Hi IF, > > I think this is what you want. You were right

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread David Storrs
Hi IF, I think this is what you want. You were right about the issue -- you were consing onto the history list but then immediately throwing away the result because it wasn't modifying the original history value. #lang racket (struct message (str sender recipient) #:transparent) ; This returns

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread IF Karona
Thank you! I can get the code that follows to run, but the chatbot never replies. I surmise this is because lists are not mutable. With the background I have the most obvious way forward would be to use an array instead of a list, but that does not strike me as the best approach to take while

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread George Neuner
Hi, Presumably you are using 'head' to get the first element of a list.   However, there is no function 'head' for lists. see:  https://docs.racket-lang.org/reference/pairs.html Try using 'first' and 'rest' instead of 'head' and 'tail'. George On 2/24/2021 3:55 PM, IF Karona wrote: Hi

[racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread IF Karona
Hi everyone, After trying to implement some changes Sage suggested (all errors are my own), I am now encountering the following message (courtesy of DrRacket): "head: unbound identifier in: head" Could someone help me find a fix? As before, I welcome suggestions on how to better do this the