Re: partial function revisited (exercise in macros)

2014-02-08 Thread r
Thanks, Let me study this a bit. Maybe I have additional questions. ranko On Saturday, February 8, 2014 12:01:37 PM UTC-5, juan.facorro wrote: > > When you use *`~p* what you are actually doing is using the symbol of > the predicate as a function. For example if you call *(partial-pbm f > symb

Re: partial function revisited (exercise in macros)

2014-02-08 Thread r
Agreed. What I'd like to have is something that works like this: (partial-pbm f ?sym? 1 ?x0 3) that would produce (given (defn ?sym?

Re: partial function revisited (exercise in macros)

2014-02-08 Thread Gary Verhaegen
When writing a somewhat complex macro, it is always a good idea to start by writing the code you would like to write (using the macro), rather than begin with the implementation. Could you perhaps provide an example use of the macro you would like to have? Not one that works, obviously, but what y

Re: partial function revisited (exercise in macros)

2014-02-08 Thread juan.facorro
When you use *`~p* what you are actually doing is using the symbol of the predicate as a function. For example if you call *(partial-pbm f symbol? 1 x 3)*, the quote-unquote (`~) will return the symbol *symbol?* which is not what you want. What you can do is use the *resolve

partial function revisited (exercise in macros)

2014-02-03 Thread rrs
Hello all, For various reasons, and despite the convenience of anonymous functions, I'd like to have a proper positional parameter binding partial function application. (Actually, I'd like to have by-name parameter binding, but that's another story.) For example, the following seems to work: (