Yesterday, Sean Kanaley wrote:
>
> My understanding from the linked blog is Racket uses phases so
> e.g. changing functions at REPL like (set! remove-duplicates-by 3)
> that might be used in macros called after this don't use the new
> binding. But if I define a global run-time function, can't it
On Jan 2, 2013, at 5:46 PM, Sean Kanaley wrote:
> What makes you say condlet is questionable? Are there built in racket
> primitives or library extensions that achieve similar goals? It is just a
> bad way to program, perhaps because of "randomly" bound nulls?
(condlet ((false (x 0))
Thanks all for the help.
Stephan: Good point about let*--I should've thought of it. Depending on
how sufficiently-smart (tm) Racket is, is it not very slightly slower to
create more bindings at run time (I suppose it could analyze bindings not
used or immediately shadowed and drop them)? I'm no
I meant to rewrite with syntax-parse before emailing out to show error
checking. Out of time.
On Jan 2, 2013, at 11:37 AM, Robby Findler wrote:
>
>
>
> On Wed, Jan 2, 2013 at 10:33 AM, Matthias Felleisen
> wrote:
>
> Sean, it took me a while to figure out condlet but here is how a Racke
On Wed, Jan 2, 2013 at 10:33 AM, Matthias Felleisen wrote:
>
> Sean, it took me a while to figure out condlet but here is how a Racketeer
> would write this (questionable) macro:
>
> (define-syntax (condlet stx)
> (syntax-case stx ()
> [(condlet ((c (x e) ...) ...) body ...)
> #'(cond
>
At Tue, 1 Jan 2013 17:59:21 -0500,
Sean Kanaley wrote:
> While I've ultimately succeeded in having it return the correct output for
> a sample input, I'm not positive it's correct in general and I *am *positive
> it's written poorly, as I don't fully understand both syntax-case and
> syntax objects
Sean, it took me a while to figure out condlet but here is how a Racketeer
would write this (questionable) macro:
(define-syntax (condlet stx)
(syntax-case stx ()
[(condlet ((c (x e) ...) ...) body ...)
#'(cond
[c (let* ((x '()) ... ...)
(let ((x e) ...)
While I've ultimately succeeded in having it return the correct output for
a sample input, I'm not positive it's correct in general and I *am *positive
it's written poorly, as I don't fully understand both syntax-case and
syntax objects vs. datums. If someone could look it over and provide a
more
8 matches
Mail list logo