   [reader]
   (if (not (nil? (peek reader)))
     (cond
-     (whitespace? reader) (do (read-char reader) (recur reader))
+     (whitespace? (peek reader)) (do (read-char reader) (recur reader))
      (comment? reader) (recur (skip-line reader))
      (number-literal? reader) (read-number reader)
      (string-literal? reader) (read-string reader)

  "Creates a StringPushbackReader from a given string"
  (StringPushbackReader. (atom s)))

(defn- whitespace?
  "Checks whether the reader is on a whitespace character."
  [reader]
  (let [ch (peek reader)]
    (or (gstring/isBreakingWhitespace ch) (= \, ch))))

(defn- comment?
  "Checks whether the reader is at the beginning of a comment"

  "Checks whether the reader is at the first digit of a number"
  [reader]
  (let [ch (peek reader)]
    (or (numeric? ch)
        (and (or (= \+ ch) (= \- ch))
             (numeric? (peek reader 2))))))

(defn- string-literal?
  "Checks whether the reader is at the first character of a string literal"
