diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-13 12:58:36 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-02 19:28:43 +0200 |
commit | 13f6f77ddee9e3e23c43d29ede5f1b39364b451f (patch) | |
tree | 27fc2f52da119d3ab24bd7aef1268d244ef2b077 /module/hnh/util | |
parent | Remove accidentially duplicated tests from merge. (diff) | |
download | calp-13f6f77ddee9e3e23c43d29ede5f1b39364b451f.tar.gz calp-13f6f77ddee9e3e23c43d29ede5f1b39364b451f.tar.xz |
Made displayln into a library export.
Diffstat (limited to '')
-rw-r--r-- | module/hnh/util/io.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/hnh/util/io.scm b/module/hnh/util/io.scm index 09900f8d..f6f97ef9 100644 --- a/module/hnh/util/io.scm +++ b/module/hnh/util/io.scm @@ -6,6 +6,7 @@ read-lines with-atomic-output-to-file call-with-tmpfile + displayln ->port)) (define (open-input-port str) @@ -74,6 +75,10 @@ (proc port filename) (close-port port)))))) +(define displayln + (case-lambda ((x) (display x) (newline)) + ((x p) (display x p) (newline p)))) + (define (->port port-or-string) (cond ((port? port-or-string) port-or-string) ((string? port-or-string) (open-input-string port-or-string)) |