Skip to content

Commit

Permalink
use (rest)
Browse files Browse the repository at this point in the history
not not critical and more readable.
  • Loading branch information
vygr committed Nov 7, 2023
1 parent b4bf8c9 commit cf69262
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/cat.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
;cat from stdin
(each-line cat-file (io-stream 'stdin))
;cat from args
(each cat-file (slice 1 -1 args)))))
(each cat-file (rest args)))))
4 changes: 2 additions & 2 deletions cmd/dump.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(("-c" "--chunk")
,(lambda (args arg)
(setq chunk_size (str-as-num (elem-get 0 args)))
(slice 1 -1 args)))
(rest args)))
))

(defun main ()
Expand All @@ -46,4 +46,4 @@
;dump from stdin
(dump-file (io-stream 'stdin))
;dump from args as files
(each (# (dump-file (file-stream %0))) (slice 1 -1 args)))))
(each (# (dump-file (file-stream %0))) (rest args)))))
2 changes: 1 addition & 1 deletion cmd/rm.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
;rm from stdin
(each-line pii-remove (io-stream 'stdin))
;rm from args
(each pii-remove (slice 1 -1 args)))))
(each pii-remove (rest args)))))

0 comments on commit cf69262

Please sign in to comment.