from macros to functions

master
thintz 12 years ago
parent 591e4e9344
commit eb3dc0d2a4

@ -1,3 +1 @@
(define-syntax _ (syntax-rules () ((_ . cmd) (run (fold (lambda (e o) (string-append o " " (->string e))) "" 'cmd))))) (define-syntax _raw (syntax-rules () ((_raw . cmd) (run (fold (lambda (e o) (string-append o " " (->string e))) "" 'cmd)))))
(define-syntax _rl (syntax-rules () ((_rl . cmd) (cmd->list (fold (lambda (e o) (string-append o " " (->string e))) "" 'cmd) read-line))))
(define-syntax _rc (syntax-rules () ((_rc f . cmd) (cmd->list (fold (lambda (e o) (string-append o " " (->string e))) "" 'cmd) 'f))))

@ -43,6 +43,8 @@
(define (run cmd) (process-wait (process-run cmd))) (define (run cmd) (process-wait (process-run cmd)))
(define (_ . r) (cmd->list (fold (lambda (e o) (++ o " " e)) "" r) read-line))
(define (shell-repl) (define (shell-repl)
(if (exit?) (if (exit?)
#t #t

Loading…
Cancel
Save