guile-user
[Top][All Lists]
Advanced

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

Re: and-let* is not composable?


From: Ian Price
Subject: Re: and-let* is not composable?
Date: Tue, 10 Sep 2013 18:57:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

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"



reply via email to

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