diff options
author | Case Duckworth | 2024-06-03 16:56:30 -0500 |
---|---|---|
committer | Case Duckworth | 2024-06-03 16:56:30 -0500 |
commit | ed4e86f47935994fb424c977e4123bde625ddff1 (patch) | |
tree | fa7e3b16c1e66741cef68d29e72b7e762ff2f8bd /src/util.scm | |
parent | Fix emit and read, add imports, fix makefile (diff) | |
download | jimmy-ed4e86f47935994fb424c977e4123bde625ddff1.tar.gz jimmy-ed4e86f47935994fb424c977e4123bde625ddff1.zip |
Fix html/other sourcing; re-scramble Makefile
Diffstat (limited to 'src/util.scm')
-rw-r--r-- | src/util.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/util.scm b/src/util.scm index 41da769..c71c600 100644 --- a/src/util.scm +++ b/src/util.scm | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | (import scheme (chicken base) | 3 | (import scheme (chicken base) |
4 | (chicken condition) | 4 | (chicken condition) |
5 | (only (chicken irregex) irregex-replace/all) | ||
5 | (chicken string)) | 6 | (chicken string)) |
6 | 7 | ||
7 | (define-syntax define-public | 8 | (define-syntax define-public |
@@ -34,6 +35,15 @@ | |||
34 | (apply alist-walk (cdr kv) (cdr keys))))))) | 35 | (apply alist-walk (cdr kv) (cdr keys))))))) |
35 | 36 | ||
36 | (define (string-join ss #!optional (sep " ")) | 37 | (define (string-join ss #!optional (sep " ")) |
37 | (string-intersperse ss sep))) | 38 | (string-intersperse ss sep)) |
39 | |||
40 | (define (flush-lines-left lines) | ||
41 | (irregex-replace/all '(: bol (* space)) | ||
42 | (string-join lines) "")) | ||
43 | |||
44 | (define (join-lines lines) | ||
45 | (apply string-append lines)) | ||
46 | |||
47 | ) | ||
38 | 48 | ||
39 | 49 | ||