On Saturday, November 5, 2016 at 3:05:04 PM UTC-7, David K. Storrs wrote:
> I've got this little snip of code:
>
>
>
>
> (define p "/tmp/foo/bar-28")
>
> (file-exists? p) ; #t
> (delete-file p)
> (file-exists? p) ; still #t ??
>
>
> I've verified that:
>
> *) It's not throwing an excep
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
I was going to post a similar request a few days ago -- until I discovered
include.
https://docs.racket-lang.org/reference/include.html?q=include#%28form._%28%28lib._racket%2Finclude..rkt%29._include%29%29
On Friday, November 18, 2016 at 5:38:53 PM UTC-7, Dan Liebgold wrote:
> I have an odd use
On Friday, November 18, 2016 at 5:27:37 PM UTC-9, gneuner2 wrote:
> On Fri, 18 Nov 2016 21:20:24 -0500, George Neuner
> wrote:
>
> >You can send directly to racket-users@googlegroups.com
>
>
> Ok, that was interesting. I wrote:
>
>racket-users at googlegroups dot com
>
> and it appears t
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
13 matches
Mail list logo