Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active October 23, 2016 16:04
Handler using timestamp coeffect
(ns visual-spelling.play.answer.handlers
(:require
[visual-spelling.db :as db]
[visual-spelling.words-in-use :as words-in-use]))
(defn word-ready-to-check-handler [{:keys [db timestamp]} _]
(let [db (update (db/save-user-answer timestamp db)
:words-in-use
words-in-use/check-current-word)]
{:db db}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment