Skip to content

Instantly share code, notes, and snippets.

@jebberjeb
Created March 1, 2016 03:46
Show Gist options
  • Save jebberjeb/de2360fa350fe48d3e99 to your computer and use it in GitHub Desktop.
Save jebberjeb/de2360fa350fe48d3e99 to your computer and use it in GitHub Desktop.
(defn generate-order
[db taskdefs ref-kw]
(->> taskdefs
(map :db/id)
(workflow/sort-taskdefs db)
(map (fn [id] (d/entity db id)))
(map :task.def/id)
(map (fn [id] [ref-kw id]))))
(defn generate-order*
[db taskdefs ref-kw]
(into []
(comp (map :db/id)
(fn [ids] (workflow/sort-taskdefs db ids))
(map (fn [id] (d/entity db id)))
(map :task.def/id)
(map (fn [id] [ref-kw id])))
taskdefs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment