experiment
This commit is contained in:
parent
f581b027a2
commit
4c07e59b83
20
experiment.rkt
Normal file
20
experiment.rkt
Normal file
|
@ -0,0 +1,20 @@
|
|||
#lang racket/base
|
||||
(require compiler/decompile
|
||||
compiler/zo-parse)
|
||||
|
||||
;; A little bit of code to see how Racket really compiles code.
|
||||
|
||||
(require scheme/pretty)
|
||||
|
||||
(provide try)
|
||||
|
||||
(define (try e)
|
||||
(let ([out (open-output-bytes)])
|
||||
(write (parameterize ([current-namespace (make-base-namespace)])
|
||||
(compile e))
|
||||
out)
|
||||
(let ([inp (open-input-bytes (get-output-bytes out))])
|
||||
|
||||
(pretty-print
|
||||
(zo-parse inp)))))
|
||||
|
Loading…
Reference in New Issue
Block a user