hyper-literate/comments/maybe.rkt

7 lines
141 B
Racket

#lang typed/racket
(provide (struct-out Some)
Maybe)
(struct (A) Some ([v : A]) #:prefab)
(define-type (Maybe A)
(U (Some A) #f))