Skip to content

Instantly share code, notes, and snippets.

@andrewberls
Created October 1, 2015 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewberls/27bbeedc76d7db75d4c9 to your computer and use it in GitHub Desktop.
Save andrewberls/27bbeedc76d7db75d4c9 to your computer and use it in GitHub Desktop.
(require '[clj-btable.core :as btable])
(def labels ["Login" "View_Cat_Food" "Purchase_Cat_Food"])
(def rows [[5.0 3.0 1.0] [2.0 0.0 0.0] [0.0 0.0 0.0]])
(btable/write "out.btable" labels rows)
; => #<File out.btable>
(btable/labels "out.btable")
; => ["Login" "View_Cat_Food" "Purchase_Cat_Food"]
(doseq [row (btable/rows "out.btable")]
(process-row row)) ; Process a single row in a lazy sequence of rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment