unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Chris Vine <vine35792468@gmail.com>
To: "Linus Björnstam" <linus.internet@fastmail.se>
Cc: guile-user@gnu.org
Subject: Re: Threading / Pipe Macro (Chris Vine, Mark H Weaver)
Date: Tue, 9 Jul 2019 10:58:23 +0100	[thread overview]
Message-ID: <20190709105823.1dc3a70b1674d5761d8d1e5c@gmail.com> (raw)
In-Reply-To: <9ce589fb-e1e4-4e55-8a29-a6c16d548d4a@www.fastmail.com>

On Tue, 09 Jul 2019 11:40:02 +0200
Linus Björnstam <linus.internet@fastmail.se> wrote:
> Sorry, I didn't see that macro. I was referring to my macro that Erik
> linked to [1], which is a syntax rules macro that also allows for <>
> argument placeholders:
> 
> (~> 1 1+ (/ 10 <>) iota (+ <...>)) => 10
> 
> It defaults to left insert, so
> 
> (~> 10 (/ 2)) => 5
> 
> but also (like the syntax rules macro i posted) also supports functions without parents as you can see in the first example.
> 
> That's what I get for trying to.follow the discussion in an unthreaded mobile app :)
> 
> [1]: https://bitbucket.org/bjoli/guile-threading-macros/src/default/

I thought your module/library was impressive.  My little macro (as it
now turns out, defective in hygiene, although it has served me well for
some time) was something I use frequently because I like the pipeline
idiom.  It inserts to the right only, because that is what I am used
to: it sort-of imitates the reverse application of a partially applied
curried function.  I think your module is based on clojure macros,
about which I know little.



  reply	other threads:[~2019-07-09  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1204.1562538418.2685.guile-user@gnu.org>
2019-07-08 21:10 ` Threading / Pipe Macro (Chris Vine, Mark H Weaver) Zelphir Kaltstahl
2019-07-08 23:00   ` Chris Vine
2019-07-09  6:04     ` Linus Björnstam
     [not found]     ` <c95c3aa9-bd06-4a17-9392-e6256b362144@www.fastmail.com>
2019-07-09  9:26       ` Chris Vine
2019-07-09  9:40         ` Linus Björnstam
2019-07-09  9:58           ` Chris Vine [this message]
2019-07-09 10:52             ` Linus Björnstam

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=20190709105823.1dc3a70b1674d5761d8d1e5c@gmail.com \
    --to=vine35792468@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=linus.internet@fastmail.se \
    /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).