Skip to content

Instantly share code, notes, and snippets.

@pnwamk
Created May 19, 2015 14:51
Show Gist options
  • Select an option

  • Save pnwamk/ca4cb96ec81f890471d0 to your computer and use it in GitHub Desktop.

Select an option

Save pnwamk/ca4cb96ec81f890471d0 to your computer and use it in GitHub Desktop.
#lang typed/racket
(: small-car (~> ([p : (Pairof (Refine [i : Integer]
(< i (cdr p)))
Integer)])
(Refine [i : Integer]
(< i (cdr p)))))
(define (small-car p)
((inst car
Integer
Integer)
p)) ;; works!
(define (small-car p)
(car p)) ;; doesn't work =(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment