PasteRack.org
Paste # 74333
2014-09-30 14:43:59

Fork as a new paste.

Paste viewed 77 times.


Embed:

  1. #lang typed/racket
  2.  
  3. (define-type r (Rec A (U Symbol (Listof A))))
  4.  
  5. (define (foo [x : r])
  6.   (if (list? x)
  7.       (map (lambda ([e : r]) e) x)
  8.       '()))

=>