leque #7747(2008/10/03 23:50 GMT) [ Scheme ] Rating0/0=0.00
書き捨てっぽく。引き数でファイル名を取って標準出力へ。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
(use srfi-1) (use text.csv) (define (main args) (receive (header body) (call-with-input-file (cadr args) (lambda (port) (car+cdr (port->list (make-csv-reader #\tab) port)))) (for-each (cute (make-csv-writer #\tab) (current-output-port) <>) (cons (list (first header) (third header) (second header) (fourth header)) (map (cut map x->string <>) (sort (map (lambda (vs) (list (string->number (first vs)) (third vs) (second vs) (+ (string->number (fourth vs)) 1))) body) (lambda (v1 v2) (< (first v1) (first v2)))))))))
Rating0/0=0.00-0+
[ reply ]
leque
#7747()
[
Scheme
]
Rating0/0=0.00
書き捨てっぽく。引き数でファイル名を取って標準出力へ。
Rating0/0=0.00-0+
[ reply ]