PasteRack.org
Paste # 70966
2015-01-27 22:20:16

Fork as a new paste.

Paste viewed 34 times.


Embed:

TR optimizer on first

  1. #lang typed/racket
  2.  
  3. (: x (Pairof (U String #f) Null))
  4. (define x '("foo"))
  5.  
  6. (if (string? (first x))
  7.     (first x)
  8.     "else")

=>

- : String

"foo"