Next: , Previous: , Up: Top   [Contents][Index]


3 Quick Start

In this chapter, we assume that you have properly installed FoCus (see Installation), and we build a short example to get you started.

Suppose you’re writing a “quotation” library which outputs a lot of quotations, enclosed in (back)quotes like this: ‘it is raining cats and dogs’. If you’re doing this very often, a pattern will quickly arise: (format t "`~A'" quotation), which you could abstract away with a custom formatting function called quotation-formatter for instance.

The problem, of course, is that writing this

(format t "~/quotation:quotation-formatter/" quotation)

is longer than doing it the quick’n dirty way, which is quite frustrating. That’s where FoCus comes to the rescue. What if you had a new format directive, say, ~`, that would do the quotation of its argument? This is what we are going to do now.