lilypond-user
[Top][All Lists]
Advanced

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

Re: [Scheme coding] turning a list into a markup/string


From: Kieren MacMillan
Subject: Re: [Scheme coding] turning a list into a markup/string
Date: Wed, 22 Jan 2020 07:23:09 -0500

Hi David,

> I'd use (lambda (d) (format "~@d" d)) here myself

Good to learn that tool!

> but it does differ in writing +0 (in case that's undesired).

It is.

> If one wants to avoid an unnecessary string-append, one can go
> (lambda (d) (let ((s number->string d))
>              (if (positive? s) (string-append "+" s) s)))

I assume you’re missing a set of parentheses? Shouldn’t it rather be

    (lambda (d) (let ((s (number->string d)))

?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

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