[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threading / Pipe Macro

From: Zelphir Kaltstahl
Subject: Threading / Pipe Macro
Date: Sun, 7 Jul 2019 12:42:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1

Hi Guile Users!

I recently looked at some online course about Elixir and saw an elegant
use of pipes (the operator `|>` in Elixir). Then I remembered, that in
Racket there are so called threading macros, which seem to accomplish
the same:

I also searched around for tutorials or explanations on how to write
these macros. Sometimes I found excellent documenation in the Chicken
Scheme wiki, so I checked there:

However, I would like to use a threading macro or pipes in Guile. I am
seeing these options:

(1) I could start trying to translate the Racket version to Guile, maybe
it would work easily, maybe it uses Racket specific macro stuff, I don't
know. However, I am not sure I would learn how the macros actually work.
Maybe I would.

(2) I could start from zero and try to implement the pipes I saw in the
online course about Elixir.

(3) Maybe something already exists in Guile, that I am unaware of and
could not find through searching. Maybe there are even more names for pipes.

So my questions are:

(1) Does something already exist?

(2) Would translating the Racket version be an easy thing to do, or is
there something in there, that cannot so easily be achieved with
syntax-parse, syntax-case and the likes? (For someone who rarely touches
macros and does not have a lot experience writing them.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]