commit 0d6a6dc
chld
·
2026-08-15 21:05:54 +0000 UTC
parent 1c0bf39
god finally target choosing
1 files changed,
+8,
-6
M
test.scm
M
test.scm
+8,
-6
1@@ -12,7 +12,7 @@
2 (define m-list '())
3 (define v-list '())
4 (define f-list (file-read
5- (if (> (length (command-line)) (+ 1 1)) (caddr (command-line)) "Makefile")
6+ (if (> (length (command-line)) (+ 1 1)) (cadr (command-line)) "Makefile")
7 ))
8
9 (do ((l (- (length f-list) 1) (- l 1)))
10@@ -35,13 +35,15 @@
11 ;; (list-sort (car (list-ref m-list 0)) m-list)(newline)
12 ;; (list-sort "goon" m-list)
13
14+(define t-line)
15+(call/cc (lambda (break)
16 (do ((i 0 (+ i 1)))
17- ((>= i (length m-list)))
18- (set! t-list (append t-list
19- (list-sort (car (list-ref m-list i)) m-list)
20- t-list
21+ ((>= i (length f-list)))
22+ (if (string=? (list-ref (string-split(list-ref f-list i)#\space)0) (cadcdr (command-line)))
23+ (set! t-line i)
24 ))
25- )
26+ ))
27+(list-sort (car (list-ref f-list t-line) t-list))
28 (set! t-list (delete-duplicates t-list equal?))
29 ;; (display t-list)(newline)
30