Created
April 14, 2011 13:56
-
-
Save mecdemort/919528 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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