slight refactor of sentence rendering and include capitalization.
This commit is contained in:
parent
58ea3864d8
commit
818f985232
@ -7,34 +7,29 @@
|
|||||||
[pronoun]
|
[pronoun]
|
||||||
[:b pronoun])
|
[:b pronoun])
|
||||||
|
|
||||||
(defn wrap-para
|
(defn render-sentence [& content]
|
||||||
[whatever]
|
[:p [:span.sentence content]]
|
||||||
[:p whatever])
|
)
|
||||||
|
|
||||||
(defn subject-example
|
(defn subject-example
|
||||||
[subject]
|
[subject]
|
||||||
(wrap-para
|
(render-sentence (wrap-pronoun (s/capitalize subject)) " went to the park."))
|
||||||
[:span#sentence (wrap-pronoun subject) " went to the park."]))
|
|
||||||
|
|
||||||
(defn object-example
|
(defn object-example
|
||||||
[object]
|
[object]
|
||||||
(wrap-para
|
(render-sentence "I went with " (wrap-pronoun object) "."))
|
||||||
[:span#sentence "I went with " (wrap-pronoun object) "."]))
|
|
||||||
|
|
||||||
(defn posessive-determiner-example
|
(defn posessive-determiner-example
|
||||||
[subject possessive-determiner]
|
[subject possessive-determiner]
|
||||||
(wrap-para
|
(render-sentence (wrap-pronoun (s/capitalize subject)) " brought " (wrap-pronoun possessive-determiner) " frisbee."))
|
||||||
[:span#sentence (wrap-pronoun subject) " brought " (wrap-pronoun possessive-determiner) " frisbee."]))
|
|
||||||
|
|
||||||
(defn possessive-pronoun-example
|
(defn possessive-pronoun-example
|
||||||
[possessive-pronoun]
|
[possessive-pronoun]
|
||||||
(wrap-para
|
(render-sentence "At least I think it was " (wrap-pronoun possessive-pronoun) "."))
|
||||||
[:span#sentence "At least I think it was " (wrap-pronoun possessive-pronoun) "."]))
|
|
||||||
|
|
||||||
(defn reflexive-example
|
(defn reflexive-example
|
||||||
[subject reflexive]
|
[subject reflexive]
|
||||||
(wrap-para
|
(render-sentence (wrap-pronoun (s/capitalize subject)) " threw the frisbee to " (wrap-pronoun reflexive) "."))
|
||||||
[:span#sentence (wrap-pronoun subject) " threw the frisbee to " (wrap-pronoun reflexive)]))
|
|
||||||
|
|
||||||
|
|
||||||
(defn twitter-name [name]
|
(defn twitter-name [name]
|
||||||
|
Loading…
Reference in New Issue
Block a user