Skip to content

Instantly share code, notes, and snippets.

View gist:5357453
(;; random ID
0 187
;; QR Opcode AA TC RD RA Z RCODE
;; 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0
129 128
;; QDCOUNT
0 1
;; ANSCOUNT
0 1
;; NSCOUNT
View gist:4123230
#lang racket
(require (for-syntax syntax/parse
syntax/parse/experimental/template
racket/syntax
racket/list))
;; A syntax class to recognize function arguments:
(begin-for-syntax
(define-splicing-syntax-class argspec
@takikawa
takikawa / bench.rkt
Created November 9, 2012 15:52 — forked from greghendershott/bench.rkt
Why is a simple contract so much slower than a check?
View bench.rkt
#lang racket
(define (f/raw x)
#t)
(define (f/checked x)
(unless (exact-nonnegative-integer? x)
(error 'f/checked "blah blah"))
#t)
View gist:2669212
(define a -1)
(define b 1)
;; original
(define x ((λ ()
(let ([l '()])
(define (loop i)
(if (< i b)
(begin (append (loop (+ i 1/100)) (list i)))
(append l (list i))))