(defn
log-source*
[reader f]
(let
[buffer (:buffer @(.-frames reader))]
(try
(swap!
(.-frames reader)
update-in
[:offset]
conj
(.getLength buffer))
(let
[ret (f)]
(if
(implements? IMeta ret)
(merge-meta ret {:source (peek-source-log @(.-frames reader))})
ret))
(finally (swap! (.-frames reader) update-in [:offset] rest)))))