* guile-threading-macros
@ 2019-05-03 12:33 Linus Björnstam
0 siblings, 0 replies; only message in thread
From: Linus Björnstam @ 2019-05-03 12:33 UTC (permalink / raw)
To: guile-user
HELLO-FELLOW-GUILERS
I wrote some threading macros ages ago that I never properly released. They are clojure-like threading macros but with cut-like placeholders.
A simple example would be ~> (left insert, when no <> placeholder is found):
(~> (list "hello" "fellow" "guilers") (map string-upcase <>) (string-join "-")) => "HELLO-FELLOW-GUILERS".
Other forms are also provided:
and~> stops when any intermediate value is #f
lambda~> threading lambda (lambda~> ...) is the same as (lambda (id) (~> id ...))
define~> (define~> id ...) is the same as (define id (lambda~> ...))
https://bitbucket.org/bjoli/guile-threading-macros
Best regards
Linus Björnstam
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-03 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-03 12:33 guile-threading-macros Linus Björnstam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).