Last active
April 6, 2018 08:13
-
-
Save yamasushi/4e39c4d5cc3016b469aa 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/4e39c4d5cc3016b469aa | |
(use gauche.lazy) | |
(use gauche.parseopt) | |
(define (main args) (let-args (cdr args) | |
((nchr "n=i" 140) . files ) | |
$ list->string | |
$ (cut ltake <> nchr) | |
(if (null? files) | |
($ port->char-lseq $ standard-input-port) | |
($ lconcatenate $ lmap ($ port->char-lseq $ open-input-file $) files) | |
) ) | |
) ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment