PasteRack.org
Paste # 12180
2015-01-30 00:04:53

Fork as a new paste.

Paste viewed 88 times.


Embed:

  1. #lang typed/racket
  2.  
  3. (define b : (Boxof Number) (box 1))
  4.  
  5. (set-box!
  6.  (cast b (Boxof String))
  7.  "I am a string")
  8.  
  9. (unbox b)

=>

- : Number

"I am a string"