Kieren MacMillan <kieren_macmil...@sympatico.ca> writes:

> 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)))
>
> ?

Oops.  Yes.

-- 
David Kastrup

Reply via email to