Skip to content

Instantly share code, notes, and snippets.

@mecdemort
Created April 14, 2011 13:56
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 mecdemort/919528 to your computer and use it in GitHub Desktop.
Save mecdemort/919528 to your computer and use it in GitHub Desktop.
(defn form-generate [division-coll callee]
(for [division division-coll
:let [dtype (:dtype division)
args (:args division)]]
;; division can be repeatable, so here we need a loop
;; + each division name and loop index should be carried down
;; to the question tail
(dtype-get dtype callee
(if (= dtype :question)
args
(update-in args [:content] form-generate callee)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment