[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] ftl egg
From: |
Thomas Christian Chust |
Subject: |
Re: [Chicken-users] ftl egg |
Date: |
Fri, 29 Jun 2007 11:41:24 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 |
Thomas Christian Chust wrote:
> [...]
> Additionally I suggest the following handy output and accumulator
> interfaces:
>
> ;;; A string output collector.
> (define o=string
> (o-interface
> ;; create
> (lambda (#!optional dst)
> (or dst ""))
> ;; write
> (lambda (obj out)
> (conc out obj))
> ;; result
> identity))
> [...]
Maybe it's better to define it like this:
;;; A string output collector.
(define o=string
(o-interface
;; create
(lambda (#!optional dst)
(or dst (open-output-string)))
;; write
(lambda (obj out)
(display obj out)
out)
;; result
get-output-string))
cu,
Thomas