diff options
author | bd <bdunahu@operationnull.com> | 2024-06-09 00:16:27 -0600 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-06-09 00:16:27 -0600 |
commit | cd47b52a406ebed5b3f82e51168ead27af3795d9 (patch) | |
tree | 78ad89d67dc77e49636634c1237edf6389c5b2d8 /report-repair/main.scm | |
parent | 6b40eb033d9c0bda4006f23426c34ef8fda4a0d5 (diff) |
AoC 2020.1 p1
Diffstat (limited to 'report-repair/main.scm')
-rwxr-xr-x | report-repair/main.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/report-repair/main.scm b/report-repair/main.scm new file mode 100755 index 0000000..cdfed63 --- /dev/null +++ b/report-repair/main.scm @@ -0,0 +1,19 @@ +#!/run/current-system/profile/bin/guile \ +-e main -s +!# + +(use-modules (rr) + ((ice-9 rdelim)) + (ice-9 binary-ports)) + + +(define (stdin-to-str) + (let loop ((result "")) + (let ((line (read-line))) + (if (eof-object? line) + result + (loop (string-append result line " ")))))) + +(define (main args) + (display (rr (stdin-to-str))) + (newline)) |