I don't know clojure but it is relatively simple to make your own
pipeline macro, if that is what you are after. Here's one approach:
(define-syntax ->
(lambda (x)
(syntax-case x ()
[(_ exp0 exp1 ...)
(let ([reversed (reverse #'(exp0 exp1 ...))])
(with-syntax
([out
(let loop ([first (car reversed)]
[rest (cdr reversed)])
(if (null? rest)
first
(syntax-case first ()
[(func arg0 ...)
(append #'(func arg0 ...)
(list (loop (car rest) (cdr rest))))])))])
#'out))])))
You can also do it with syntax-rules:
(define-syntax ->
(syntax-rules ()
[(-> exp)
exp]
[(-> exp ... (op args ...))
(op args ... (-> exp ...))]))
Expressions are evaluated left to right, rather like ML's |>
operator. So usage of these is thus:
(-> "hello"
(format #t "~A~%"))
In that example the pipeline expression itself evaluated to
undefined (the return value of format), but it could evaluate to
anything.