lilypond-user
[Top][All Lists]
Advanced

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

Re: list of strings from a string


From: David Kastrup
Subject: Re: list of strings from a string
Date: Thu, 04 Jun 2020 02:32:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Valentin Villenave <valentin@villenave.net> writes:

> On 6/3/20, Freeman Gilmore <freeman.gilmore@gmail.com> wrote:
>>   % Gives me this: (-3 A -6 1 -B),
>
> Well, it _is_ a list of strings, as you can verify by adding:
>
> #(display (map string? Y))
>
> Or you can use
>   #(write Y)
> instead of (display Y), which will print the double quotes.
>
>>   % I need: ("-3" "A" "-6" "1" "-B"), how do I get this?  A list of
>> strings.
>
> Well, you can always do
>
> #(set! Y (map (lambda (s) (string-append "\"" s "\"")) Y))
>
> but as I said, that’s not necessary.

Also it will not backslash-escape quote marks or newlines or, well,
backslashes.  If you want a rendition that can be read back by Scheme,
«write» really is the saner option.

-- 
David Kastrup



reply via email to

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