Skip to content

Commit

Permalink
Added missing function multiple-authors?.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Rahkola committed Oct 22, 2012
1 parent 2fd0939 commit ba5043b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/structured_data.clj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
(defn author-count [book]
:-)

(defn multiple-authors? [book]
:-)

(defn add-author [book new-author]
:-)

Expand Down
5 changes: 5 additions & 0 deletions test/structured_data_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
(author-count cities) => 1
(author-count wild-seed) => 1
(author-count little-schemer) => 2)

(facts "multiple-authors?"
(multiple-authors? cities) => false
(multiple-authors? wild-seed) => false
(multiple-authors? little-schemer) => true)

(facts "add-author"
(add-author little-schemer {:name "Gerald J. Sussman"})
Expand Down

0 comments on commit ba5043b

Please sign in to comment.