On Sat, Aug 4, 2018 at 3:18 PM, Sanjeev Sharma wrote:
> but as long as one is defaulting #:unless
> PLUS #unless is common to all the for's across some arbitrary scope,
> ideally one could elide it from each of the for's within that scope.
>
Local macros might be part of what you want:
#lang
the specific case I had in mind was near this
(let ([unless? odd?])
(for/sum ([x '(1 2 3 4 5)]
#:unless (uless? x))
x)) ;6
but as long as one is defaulting #:unless
PLUS #unless is common to all the for's across some arbitrary scope,
ideally one could
Do you mean that in something like this:
(for/sum ([x '(1 2 3 4 5)]
#:unless (odd? x))
x) ;6
You have many occurrences of the `(odd? x)` and you'd like to define
that in one place that you can vary?
If so:
First, if they're in the same local scope, you could use `let`:
I'm still not sure that I understand what the original questioner is trying
to do. It might help to see an example in code to be clear that we're all
talking about the same thing.
A few points for the list, though:
On Fri, Aug 3, 2018 at 10:53 PM, George Neuner wrote:
> (define mykey
On 8/3/2018 11:52 AM, Sanjeev Sharma wrote:
make a keyword useable as the parameter-expr in a parameterize
expression.
for example, If I need a similar #:unless cause for a bunch of for
expressions
It's not a current issue, but would be good to have in the toolbox
for next time.
If I'm
make a keyword useable as the parameter-expr in a parameterize expression.
for example, If I need a similar #:unless cause for a bunch of for
expressions
It's not a current issue, but would be good to have in the toolbox for
next time.
On Thursday, August 2, 2018 at 8:25:31 PM UTC-4,
On 8/2/2018 7:45 PM, Sanjeev Sharma wrote:
can racket's #: keywords be finagled / coerced into a parameterizable
form?
???
Certainly you can pass a parameter to a keyword argument, and/or make a
parameter the default value of a keyword argument. And you can use an
argument to
can racket's #: keywords be finagled / coerced into a parameterizable
form?
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
8 matches
Mail list logo