Interesting, I just noticed I can do (define foo identity)
, however I cannot define a method like this. (class object% (super-new) (define/public foo identity))
complains that this is a bad form for method definition. Why is this?
Looks like (define/public ...)
has a (reasonably?) strict definition of what might constitute a method? I’m unfamiliar with the identity
identifier - is it a synonym for (lambda (i) i)
?
@lexi.lambda I would think taking that code as a starting position is a good idea, but trusting it to be complete or correct is not
@al has joined the channel
Is there any particular place discussing the AdventofCode2017 puzzles (and completing in racket)?
I think Matthew Butterick is doing them in Racket, you can see his code on GitHub
oh cool, thanks
wow, some of that looks really nice
I’m working on Advent as well
How to specify a free-id=? in syntax-parse
as in syntax-case*
? I wish to supply something like (free-identifier=? a b ph 0)
the #:phase
option will compare the literals as if it is (free-identifier=? a b ph ph)
right?
@shu—hung huh, I didn’t know syntax-case*
existed
my wildly speculative guess is you could make a syntax class
thanks, let me check that
Oh, maybe #:phase will just be okay. I’m applying syntax-parse to syntax objects that are expand
ed, so the relevant bindings should be there
That’s what I expected identity
to be.