[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile-threading-macros
From: |
Linus Björnstam |
Subject: |
guile-threading-macros |
Date: |
Fri, 03 May 2019 08:33:31 -0400 |
User-agent: |
Cyrus-JMAP/3.1.6-449-gfb3fc5a-fmstable-20190430v1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile-threading-macros,
Linus Björnstam <=