commit 7dbb522

chld  ·  2026-08-15 17:17:06 +0000 UTC
parent 7f6c05e
util.scm: fix cadr error
makefile: add hi, green, and goon
3 files changed,  +15, -5
+5, -1
 1@@ -1,4 +1,8 @@
 2 x: a b
 3 a: c
 4 b: 
 5-c: 
 6+c:
 7+
 8+goon: green
 9+green: hi
10+hi:
+2, -1
 1@@ -16,7 +16,8 @@
 2 (display m-list)
 3 (newline)(newline)
 4 
 5-(list-sort "x" m-list)
 6+(list-sort (car (list-ref m-list 0)) m-list)(newline)
 7+(list-sort "goon" m-list)
 8 
 9 ;; (display (list-ref (list-ref (list-ref m-list 0) 1) 0))
10 
+8, -3
 1@@ -5,10 +5,15 @@
 2 )
 3 
 4 (define (file-read f)
 5-  (call-with-input-file f (lambda (p)
 6-			    (let loop ((L '()))
 7+  (call-with-input-file f
 8+    (lambda (p)
 9+      (let loop ((L '()))
10         (let ((l (read-line p)))
11-          (if (eof-object? l)(reverse L)(loop (cons l L))))))))
12+          (if (eof-object? l)
13+              (reverse L)
14+              (if (string-null? (string-trim-both l))
15+                  (loop L)
16+                  (loop (cons l L)))))))))
17 
18 (define (line-parse l)
19   (let* ((p (string-split l #\:))