Last active
January 26, 2016 09:03
-
-
Save yamasushi/f9a42af9936805d1cc2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env gosh | |
| ; https://gist.github.com/yamasushi/f9a42af9936805d1cc2f | |
| (use gauche.parseopt) | |
| (use gauche.lazy) | |
| ; cat | |
| ; files ----> port ----> lseq | |
| (define (main args) (let-args (cdr args) | |
| ((help "h|help") . files) | |
| ($ for-each print | |
| (if (null? files) | |
| ($ port->string-lseq $ standard-input-port) | |
| ($ lconcatenate $ lmap ($ port->string-lseq $ open-input-file $) files) | |
| ) ) | |
| ) ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment