 ;; data structure readers
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defn not-implemented
+  [rdr ch]
+  (throw (str "Reader for " ch " not implemented yet")))
+
+(defn read-dispatch
+  [rdr _]
+  (let [ch (read-char rdr)
+        dm (get dispatch-macros ch)]
+    (if dm
+      (dm rdr _)
+      (throw (str "No dispatch macro for " ch)))))
+
+(defn read-unmatched-delimiter
+  [rdr ch]
+  (throw (str "Unmached delimiter " ch)))
+
 (defn read-list
   [rdr _]
-  (read-delimited-list ")" rdr true))
+  (apply list (read-delimited-list ")" rdr true)))
 
 (defn read-vector
   [rdr _]
-  (vec (read-delimited-list "]" rdr true)))
+  (read-delimited-list "]" rdr true))
 
 (defn read-map
   [rdr _]


(ns cljs.reader
  (:require [goog.string :as gstring
             goog.string.StringBuffer :as gstringbuf]))

(defprotocol PushbackReader
  (read-char [reader] "Returns the next char from the Reader,

     (nil? ch) sentinel
     (whitespace? ch) (recur reader eof-is-error sentinel is-recursive)
     (comment-prefix? ch) (recur (skip-line reader) eof-is-error sentinel is-recursive)
     (macros ch) ((macros ch) reader ch)
     :default (read-symbol reader ch))))


