Skip to content

Instantly share code, notes, and snippets.

@yamasushi
Last active January 26, 2016 09:03
Show Gist options
  • Select an option

  • Save yamasushi/f9a42af9936805d1cc2f to your computer and use it in GitHub Desktop.

Select an option

Save yamasushi/f9a42af9936805d1cc2f to your computer and use it in GitHub Desktop.
#!/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