Created
August 7, 2020 17:40
-
-
Save artyom-poptsov/f1a3479522455b97cbbf30801d395f1e to your computer and use it in GitHub Desktop.
This file contains 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
(define-syntax M#! | |
(syntax-rules (=>) | |
((_ type command) | |
(list (quote type) command)) | |
((_ => type command) | |
`(,(list (quote type) command))) | |
((_ => type command rest ...) | |
`(,(list (quote type) command) ,@(M#! rest ...))) | |
((_ type command => rest ...) | |
(apply plumb `(,(list (quote type) command) ,@(M#! => rest ...)))))) | |
;; Usage example: | |
;; (M#! local "cat /etc/hosts" => local "grep 127" => local "sort") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment