From ba5043bf84ba51b797cd5c2f55ce12259fed7892 Mon Sep 17 00:00:00 2001 From: Jani Rahkola Date: Mon, 22 Oct 2012 11:42:02 +0300 Subject: [PATCH] Added missing function multiple-authors?. --- src/structured_data.clj | 3 +++ test/structured_data_test.clj | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/structured_data.clj b/src/structured_data.clj index f744410d..ebfe1ce4 100644 --- a/src/structured_data.clj +++ b/src/structured_data.clj @@ -42,6 +42,9 @@ (defn author-count [book] :-) +(defn multiple-authors? [book] + :-) + (defn add-author [book new-author] :-) diff --git a/test/structured_data_test.clj b/test/structured_data_test.clj index 85727572..0f188a0f 100644 --- a/test/structured_data_test.clj +++ b/test/structured_data_test.clj @@ -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"})