(defn
down!
"Changes the current line and returns the next line from console-history, or nil if there is none."
[console-history]
(let
[line (get-next-line console-history)]
(if
line
(swap! console-history update :current-line inc)
(swap!
console-history
assoc
:current-line
(-> @console-history :lines count)))
line))