PasteRack.org
Paste # 38283
2016-02-08 12:55:23

Forked from paste # 11748.

Fork as a new paste.

Paste viewed 54 times.


Embed:

  1. #lang racket
  2.  
  3. (struct myset (contents)
  4.   #:transparent
  5.   #:constructor-name make-myset)
  6.  
  7. (define (myset . as) (make-myset as))
  8.  
  9. (myset 1 2 3)
  10.  
  11. (define ok/c (struct/c myset list?))
  12. (match (myset 1 2 3)
  13.   [(myset x) x])

=>