 (defn matches-query?
   [search-input course]
   (let [matches-input? (fn [key]
-                         (re-find (re-pattern (s/lower-case search-input))
-                                  (s/lower-case (key course))))]
+                         (re-find (re-pattern (string/lower-case search-input))
+                                  (string/lower-case (apply str (val course)))))]
     (if (= "" search-input)
       true
       (or (matches-input? :name)

       [:div {:class "u-full-width"}
        [:ul
         (for [course (filter (partial matches-query? @search-input) @courses)]
           ^{:key (:number course)} [course-component course])]]])))

(defn course-row-component
  [course]
  [:tr
   [:td (:name course)]
   [:td (:number course)]
   [:td (:prof course)]
   [:td (:time course)]
   [:td (:credits course)]
   [:td (:type course)]])

(defn courses-table-component
  []

            [goog.events :as events]
            [goog.history.EventType :as EventType]
            [cljsjs.react :as react]
            [clojure.string :as string])
  (:require-macros [reagent.ratom  :refer [reaction]])
  (:import goog.History))

