This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Broken deftype

By: a guest on Dec 28th, 2010  |  syntax: Lisp  |  size: 0.18 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (deftype X []
  2.   Object
  3.   (toString [this]
  4.     (str "(instance? X this) -> " (instance? X this))))
  5.  
  6. (clojure-version)
  7. ; -> "1.2.0"
  8.  
  9. (str (X.))
  10. ; -> "(instance? X this) -> false"
clone this paste RAW Paste Data