10 lines
172 B
Racket
10 lines
172 B
Racket
#lang typed/scheme
|
|
|
|
(define-struct: foo [(bar : Integer)])
|
|
|
|
(: f (foo -> Integer))
|
|
(define (f x)
|
|
(if (zero? (foo-bar x))
|
|
(error 'f "Nooooooo!")
|
|
(foo-bar x)))
|