|
From: | Kon Lovett |
Subject: | Re: [Chicken-users] format-modular usage question |
Date: | Mon, 30 Jul 2007 10:48:19 -0700 |
On Jul 30, 2007, at 10:23 AM, Joshua Griffith wrote:
Hello,I'm trying to use format to create a string consisting of the cars of a list of lists delimited by commas and enclosed by parentheses. I tried the following statement:(format #f "(~:{~a~:^, ~})" '((prop1 val1) (prop2 val2) (prop3 val3)))
Umm, according to the "format-modular" doc, '~:^' is not implemented. Sorry.
Out of the unimplemented feature set this is probably the next one that should be done. Will you open a TRAC ticket please.
Kon
But it returns: "(prop1, prop2, prop3, )" However, I'm trying to get: "(prop1, prop2, prop3)"It seems that ~:^ is not escaping on the last element, causing the last comma and space to be emitted. Does anyone know how to modify the format statement to eliminate the last comma and space? I know that I could just map car and format the result, but I'm trying to learn more about format.Thanks, Joshua _______________________________________________ Chicken-users mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/chicken-users
[Prev in Thread] | Current Thread | [Next in Thread] |