Hello chicken-hackers, I think it would be nice to add Guile’s with-error-to-string function to CHICKEN’s ports unit:
;; Call procedure THUNK with the current error output-port temporarily
;; bound to a string-output-port and return the accumulated output
;; string.
(define with-error-to-string
(lambda (thunk)
(fluid-let ([##sys#standard-error (open-output-string)])
(thunk)
(get-output-string ##sys#standard-error))))
This would neatly compliment the port unit’s with-output-to-string. Thoughts?
Thanks,
Michael
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
