Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

[Racket] Why did it ask me two times?

Name: Anonymous 2013-07-12 5:58

macro-test.rkt:
#lang racket
(define-syntax my-map
  (lambda (stx)
    (syntax-case stx (in)
      [(my-map func lst)
       (displayln (read))
       (let ([func2 (eval (syntax->datum #'func))]
             [lst2 (eval (syntax->datum #'lst))])
         #`'#,(map func2 lst2))])))

(my-map (λ (x) (- x 4)) '(7 8 9))


$ raco exe macro-test.rkt
hajshdf 
hajshdf
9898989898989898989
9898989898989898989
$ ./macro-test
'(3 4 5)

subj

Name: Anonymous 2013-07-12 8:44

Because you asked it to ask you two times.

Name: Anonymous 2013-07-12 9:25

>>2
How? Why does the "raco exe <filename>.rkt" command compile (or what does it exactly do?) the module twice?

Name: Anonymous 2013-07-12 23:03

Use CommonLithpu.

Name: Anonymous 2013-07-13 0:53

compile my module once, shame on you. compile my module twice, shame on me.

Name: Anonymous 2013-07-13 6:36

Can someone explain me what the fuck is going on? I have no idea.

Oh. Just googled. PLT Scheme is now racket. lolz.

Don't change these.
Name: Email:
Entire Thread Thread List