[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
- Re: [Scheme coding] turning a list into a markup/string, (continued)
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
- Re: [Scheme coding] turning a list into a markup/string, David Kastrup, 2020/01/21
Re: [Scheme coding] turning a list into a markup/string, Kieren MacMillan, 2020/01/21
Re: [Scheme coding] turning a list into a markup/string, Urs Liska, 2020/01/22