typed-racket/typed-racket-test/succeed/pr11504.rkt
2014-12-16 10:07:25 -05:00

8 lines
172 B
Racket

#lang typed/racket
(define-type Animal (U cat dog))
(define-predicate animal? Animal)
(struct: cat ([lives : Natural]))
(struct: dog ([bark : Natural] [bite : Natural]))