Re: cl-quiz




"Tel A." <abrahamson.j@xxxxxxxxx> wrote in message news:1146349850.663100.314870@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A question in pertinance to the quiz:

How could one write a format directive something to the effect of

;wrong
(format nil "~r ~a~:p" 10 "apricot")
=> "10 apricots"

(format nil "~r ~a~:p" 1 "apricot")
=> "1 apricot"

I would like it to take two arguments, print the first one as a real
then print the second one, a string, with correct pluralization as per
the first argument.

Anyone done this before?

(format nil "~r ~a~:2*~P" 1 "apricot")

---
Geoff


.