What about for*/set ?
#lang racket
(require racket/set)
(define (generate-powers lower upper)
(for*/set ([a (in-range lower (add1 upper))]
[b (in-range lower (add1 upper))])
(expt a b)))
(set-count (generate-powers 2 5))
(set-count (generate-powers 2 100))
Best regards
Hello.
Is there a way in Racket to have a module (say, "my-module") which
provides just one form (say, "my-begin"), and this form works the same
way as standard begin, but inside it all the bindings from the
my-module become visible.
So the module may look like this:
--- my-module.rkt ---
#
t the only thing
added to the top level is supposed to be the quasi-begin form itself.
Best regards, Maxim.
On 2011-08-22 16:04, Eli Barzilay wrote:
50 minutes ago, Maxim Romashchenko wrote:
--- my-module.rkt ---
#lang racket
(provide my-begin)
(define foo
...
-
You
cro), so you may have to do some direct
manipulation of syntax objects to get the scope how you want it. I
hope I've at least given you some useful starting places.
Carl Eastlund
On Mon, Aug 22, 2011 at 10:04 AM, Maxim Romashchenko wrote:
Hello.
Thank you for your reply, Eli.
It looks lik
und within my-begin, and the "names" module will provide
only my-begin.
--Carl
On Tue, Aug 23, 2011 at 3:22 AM, Maxim Romashchenko wrote:
Thank you, Matthias and Carl, for a detailed reply.
I'm now much close to my goal. Almost there.
The approach with non-hygienic macro (item
5 matches
Mail list logo