I have a function that reads one token from an input stream that is called (get-next-indicator stream indicator) and returns it. I am trying to use it to construct a map.
But, when I run it, it locks up. If I remove one of the get-next-indicator function, it does work. Does both functions try to read the stream at the same time is this. What is causing this?
(defn decode-map [ stream ]
(loop [result {}]
(let [c (char (.read stream))]
(if (= c \e)
result
(recur (assoc result (get-next-indicator stream (int c))
(get-next-indicator stream (int c)) ))))))