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)))
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
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users