Without the macro, the last line would have been
(some-func ((parameter-1) some-arg)
The question comes when you would have used (parameter-1) in a higher-order
context. Do you want it to be equivalent to (parameter-1), or equivalent to
(lambda (arg ...) ((parameter-1) arg ...)) ?
In your s
On 11/20/2016 12:04 AM, Dmitry Pavlov wrote:
On 11/19/2016 11:45 PM, Alex Knauth wrote:
On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov wrote:
Out of curiosity, why do you want this?
I have a bunch of parameters (in the Racket sense of the word)
that are "read-only" throughout the module,
On 11/19/2016 11:45 PM, Alex Knauth wrote:
On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov wrote:
Out of curiosity, why do you want this?
I have a bunch of parameters (in the Racket sense of the word)
that are "read-only" throughout the module, i.e. there are no
modifications via calls (para
> On Nov 19, 2016, at 1:51 PM, Dmitry Pavlov wrote:
>
>> Out of curiosity, why do you want this?
>
> I have a bunch of parameters (in the Racket sense of the word)
> that are "read-only" throughout the module, i.e. there are no
> modifications via calls (parameter value).
>
> Most of parameter
Out of curiosity, why do you want this?
I have a bunch of parameters (in the Racket sense of the word)
that are "read-only" throughout the module, i.e. there are no
modifications via calls (parameter value).
Most of parameters' values are themselves functions.
So what I wanted to save a cou
Out of curiosity, why do you want this?
On Sat, Nov 19, 2016 at 9:08 AM, Dmitry Pavlov wrote:
> Alex,
>
>
> Using that your macro would be:
>>
>> (define-syntax call-my-func
>> (make-variable-like-transformer #'(my-func)))
>>
>
> Perfect solution, thank you!
>
> I read about make-rename-transf
Alex,
Using that your macro would be:
(define-syntax call-my-func
(make-variable-like-transformer #'(my-func)))
Perfect solution, thank you!
I read about make-rename-transformer, but make-variable-like-transformer
escaped me.
Best regards,
Dmitry
--
You received this message because y
> On Nov 19, 2016, at 5:33 AM, Dmitry Pavlov wrote:
>
> OK, it seems that I have found the way:
>
> (define-syntax (call-my-func stx)
> (syntax-parse stx
>[x:id #'(my-func)]
>[(x:id) #'((my-func))]
>[(x:id arg ...) #'((my-func) arg ...)])
>)
>
> It suits my nee
OK, it seems that I have found the way:
(define-syntax (call-my-func stx)
(syntax-parse stx
[x:id #'(my-func)]
[(x:id) #'((my-func))]
[(x:id arg ...) #'((my-func) arg ...)])
)
It suits my needs, although is not as simple as would
be a "replace call-my-func with
Hello,
I was wondering how I can define a macro that acts without parentheses.
Here is what I came up with:
(define (my-func) "abc")
(define-syntax (call-my-func stx)
(syntax-case stx ()
(_ #'(my-func
It was fine at the first glance:
call-my-func
"abc"
But then I tried
(ca
10 matches
Mail list logo