From 5814a6cadbd6f6ca36398806197d458730686e03 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 13 Sep 2014 20:17:45 +0100 Subject: Refactor reducers for easier testing --- src/microformats/parser.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj index 882759a..94f0110 100644 --- a/src/microformats/parser.clj +++ b/src/microformats/parser.clj @@ -6,12 +6,12 @@ (defn mf-names-from-class "Get microformat classnames from a class attribute" [prefix] - (r/filter #(.startsWith % prefix))) + #(.startsWith % prefix)) (defn remove-mf-prefix "Remove microformats prefixes from a class attribute" [prefix] - (r/map #(apply str (drop (count prefix) %)))) + #(apply str (drop (count prefix) %))) (defn- split-classes "Split a whitespace-separated string." @@ -22,8 +22,8 @@ "Convert class list to list of microformat property keywords" [prefix] (comp (r/map keyword) - (remove-mf-prefix prefix) - (mf-names-from-class prefix))) + (r/map (remove-mf-prefix prefix)) + (r/filter (mf-names-from-class prefix)))) (defn element-to-classes "Get list of classes from an element" -- cgit 1.4.1