unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Linus Björnstam" <linus.internet@fastmail.se>
To: guile-user@gnu.org
Subject: guile-threading-macros
Date: Fri, 03 May 2019 08:33:31 -0400	[thread overview]
Message-ID: <2a7ea180-ef85-4b14-aea5-f6ed68295952@www.fastmail.com> (raw)

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



                 reply	other threads:[~2019-05-03 12:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a7ea180-ef85-4b14-aea5-f6ed68295952@www.fastmail.com \
    --to=linus.internet@fastmail.se \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).