Skip to content

Instantly share code, notes, and snippets.

@jakecraige
Created October 21, 2014 01:57
Show Gist options
  • Save jakecraige/3b49ca0fb2450523ba8c to your computer and use it in GitHub Desktop.
Save jakecraige/3b49ca0fb2450523ba8c to your computer and use it in GitHub Desktop.
core-async, it's just like ES6 Generators!
(def db (pouch/create-db "todos"))
(go
(<! (pouch/put-doc db {:_id (now) :text "Todo 1"}))
(<! (pouch/put-doc db {:_id (now) :text "Todo 2"}))
(let [res (<! (pouch/all-docs db))]
(println res)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment