   (:require [foo.bar]
             [m]
             [ajax.core :refer [GET POST]]))
+
+; Contants
+
+(def ^:const PAGESIZE 10)
 
 ; Mithril helpers
 

;

(def db
  {:var (str "tosi:" (rand-int 10))})

(defn ^:export updatedb [fields value]
  (set! db (assoc-in db fields value))

; View
;

(defn notes [start]
  "Returns 10 items from data"
  (map
    (fn [item]
      (let [title (get item "title")]
          (m "li" nil title)))
    (take PAGESIZE (drop start (:data db)))))

(defn ctrl []
  (println "Calling major Tom")
