Skip to content

Instantly share code, notes, and snippets.

@timsgardner
Created January 28, 2015 08:07
Show Gist options
  • Save timsgardner/ece978bc5a91e86bc7dd to your computer and use it in GitHub Desktop.
Save timsgardner/ece978bc5a91e86bc7dd to your computer and use it in GitHub Desktop.
vector reader
(binding [*data-readers* {'v3 (fn [[x y z]] (UnityEngine.Vector3. x y z))}]
(eval (read-string "#v3[1 2 3]")))
;; => (1.0, 2.0, 3.0)
@nasser
Copy link

nasser commented Jan 28, 2015

(binding [*data-readers* {'gameidea (fn [x] "ship it")}]
   (eval (read-string "#gameidea :faraday-the-fearless")))

;; => "ship it"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment