From: Ian Price <ianprice90@googlemail.com>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: and-let* is not composable?
Date: Tue, 10 Sep 2013 18:57:52 +0100 [thread overview]
Message-ID: <87li34mue7.fsf@Kagami.home> (raw)
In-Reply-To: <CAMFYt2Z2qxkdrf1WOGZ4FowoAxLY8vtLUB-nAprg_fi2_sbCew@mail.gmail.com> (Panicz Maciej Godek's message of "Mon, 9 Sep 2013 19:35:16 +0200")
I have a few notes unrelated to those I've already mentioned in the
thread.
1. Guile already has curried definitions in (ice-9 curried-definitions)
2. By turning your functions definitions into a macro, you've lost the
ability to use them in a first class manner.
3. I would strongly recommend _not_ using define-macro, and even more
so, not mixing define-macro and syntax-rules in a macro. Syntax-case is
as powerful as defmacro, and in most practical cases, about as much
writing.
4. What your macro does is not currying, it is partial
application. Those are different things. Currying refers to the process
of turning a function of n arguments into an n-nested set of 1 argument
functions. Partial application is, well, not supplying all the arguments
to a function. You can have partial application without currying, as
your macro shows.
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
next prev parent reply other threads:[~2013-09-10 17:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 17:35 and-let* is not composable? Panicz Maciej Godek
2013-09-09 20:26 ` Stefan Israelsson Tampe
2013-09-09 21:34 ` Ian Price
2013-09-10 13:42 ` Stefan Israelsson Tampe
2013-09-10 13:51 ` Ian Price
2013-11-02 2:39 ` Ian Price
2013-11-02 19:01 ` Ian Price
2013-09-10 17:57 ` Ian Price [this message]
2013-09-11 12:25 ` Panicz Maciej Godek
2013-09-11 14:05 ` Ian Price
2013-09-13 18:40 ` Panicz Maciej Godek
2013-09-14 8:19 ` Stefan Israelsson Tampe
2013-10-04 22:27 ` Panicz Maciej Godek
2013-10-05 8:00 ` Ian Price
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=87li34mue7.fsf@Kagami.home \
--to=ianprice90@googlemail.com \
--cc=godek.maciek@gmail.com \
--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).