adjust defview so that componen-map can be passed as the second arg

This commit is contained in:
Roman Volosovskyi 2018-09-15 08:59:30 +03:00
parent dd19989f12
commit 448e84a0e9
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@
rest-body) rest-body)
[subs component-map body] (case (count rest-body') [subs component-map body] (case (count rest-body')
1 [nil {} (first rest-body')] 1 [nil {} (first rest-body')]
2 [(first rest-body') {} (second rest-body')] 2 (let [first-element (first rest-body')]
(if (map? first-element)
[nil first-element (second rest-body')]
[(first rest-body') {} (second rest-body')]))
3 rest-body') 3 rest-body')
[subs-bindings vars-bindings] (prepare-subs subs)] [subs-bindings vars-bindings] (prepare-subs subs)]
`(do `(do