Skip to content

Instantly share code, notes, and snippets.

@aturon
Created May 4, 2012 20:12
Show Gist options
  • Save aturon/2597424 to your computer and use it in GitHub Desktop.
Save aturon/2597424 to your computer and use it in GitHub Desktop.
racket's escape analysis
; when compiled, does this code ...
(define (abs x)
(define (f)
(if (> x 0) x (g))
(define (g)
(- 0 x))
(f))
; ... turn into this code?
(define (abs x)
(if (> x 0) x (- 0 x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment