Skip to content

Commit

Permalink
Add author-names
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilmari Vacklin committed May 17, 2012
1 parent a7af2b7 commit 245d68f
Show file tree
Hide file tree
Showing 2 changed files with 10 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 @@ -24,4 +24,7 @@
(defn book-titles-by-author [author books]
:-)

(defn author-names [authors]
:-)

; %________%
7 changes: 7 additions & 0 deletions test/structured_data_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@
=> ["The City and the City" "Embassytown"]
(book-titles-by-author "Octavia E. Butler" books)
=> ["Wild Seed"])

(facts "author-names"
(author-names [{:name "China Miéville", :birth-year 1972}
{:name "Octavia E. Butler"
:birth-year 1947
:death-year 2006}])
=> ["Octavia E. Butler" "China Miéville"])

0 comments on commit 245d68f

Please sign in to comment.