Take the following simple CouchDB named test:
{"total_rows":2,"offset":0,"rows":[
{"id":"_design/tst","key":"_design/tst","value":{"rev":"3-312aaf2d14174ef415d185d460f4380a"},"doc":{"_id":"_design/tst","_rev":"3-312aaf2d14174ef415d185d460f4380a","shows":{"own":"function(doc, req){return this.configval+\" - \"+doc.docval;}"},"configval":"bla"}},
{"id":"tst2","key":"tst2","value":{"rev":"2-2f1a6af53d8b871b677f79da8e0a2f45"},"doc":{"_id":"tst2","_rev":"2-2f1a6af53d8b871b677f79da8e0a2f45","docval":"blup"}}
]}
It consists of two docs: one tst2 (a normal doc with a value "docval") plus a design document "_design/tst" with a config value "configval" and a show function printing both config val and doc val.