diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-09-18 22:53:46 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-09-18 22:53:46 +0200 |
commit | 24f1360f694ec0f3e4cfc392a5392fef0576dd13 (patch) | |
tree | 4c693b0c75372d52289098a1b479931792b7e65a /scripts/static-util.scm | |
parent | Slightly better error handling in HTTP routes. (diff) | |
download | calp-24f1360f694ec0f3e4cfc392a5392fef0576dd13.tar.gz calp-24f1360f694ec0f3e4cfc392a5392fef0576dd13.tar.xz |
Move get-forms to module static-util.
Diffstat (limited to 'scripts/static-util.scm')
-rw-r--r-- | scripts/static-util.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/static-util.scm b/scripts/static-util.scm new file mode 100644 index 00000000..7aa3626e --- /dev/null +++ b/scripts/static-util.scm @@ -0,0 +1,9 @@ +(define-module (static-util) + :export (get-forms)) + +(define (get-forms port) + (let loop ((done '())) + (let ((form (read port))) + (if (eof-object? form) + done + (loop (cons form done)))))) |