          :cursor 0
          :input ""))
 
-(defn eval-input [state]
-  (let [expression (str/trim (:input @state))]
+(defn eval-input [state input]
+  (let [expression (str/trim input)]
     (when-not (str/blank? expression)
       (eval-str! expression)
       (swap! state assoc :ready? false :input "" :cursor 0))))

        "Copy Output"])
     [clipboard
      [:li.mdl-menu__item
       {:data-clipboard-text (if (string? (:value result))
                               (:value result)
                               (pprint-str (:value result)))}
       "Copy Result"]]]]])

(defn history-card-expression [props ns expression]
  [:div.card-data.expression
   [:div.codeMirror-lines {:style {:float :left}} [:code (str ns "=>")]]
   [:div
    [editor/code  expression]]])

(defn history-card-output [props output]
  [:div

     [:div.flex-h
      [repl-input props]
      [run-button props]]]]])


(defn history [props]
