Skip to content

Commit

Permalink
Fixes #10: Correct ns typo
Browse files Browse the repository at this point in the history
  • Loading branch information
noprompt committed Aug 12, 2013
1 parent 6682d9a commit 4b2ea8e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dev/user.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[garden.def :refer [defrule]]
;; Comment this line before running tests to prevent
;; warning messages.
;;[garden.arithemetic :refer [+ - * /]]
;;[garden.arithmetic :refer [+ - * /]]
[clojure.string :as s]
[clojure.pprint :refer [pprint pp]]
[clojure.repl :refer [source doc]]))
Expand Down
12 changes: 6 additions & 6 deletions src/garden/arithemetic.clj → src/garden/arithmetic.clj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
(ns garden.arithemetic
"Generic arithemetic operators for computing sums, differences,
(ns garden.arithmetic
"Generic arithmetic operators for computing sums, differences,
products, and quotients between CSSUnits, CSSColors, and numbers."
(:refer-clojure :exclude [+ - * /])
(:require [garden.units :as u :refer [unit?]]
[garden.color :as c :refer [color?]]))

;; The motivation for the functions in this namespace is the
;; contention that working with unit arithemetic functions (`px+`,
;; `px-`, etc.) and color arithemetic functions (`color+`, `color-`,
;; contention that working with unit arithmetic functions (`px+`,
;; `px-`, etc.) and color arithmetic functions (`color+`, `color-`,
;; etc.) can at times be a bit unweildly. In some cases it would be
;; nice to have functions which could transparently perform unit and
;; color math without the verbosity.

;; Here, such functions are provided.

;; All operations favor `CSSUnit` and `CSSColor` types and fall back to
;; the standard `clojure.core` arithemetic functions. The preference for
;; the standard `clojure.core` arithmetic functions. The preference for
;; this order stems from the assertion that it is far more likely unit
;; arithemetic will be performed in the context of a stylesheet versus
;; arithmetic will be performed in the context of a stylesheet versus
;; color or numeric.

(defn +
Expand Down
2 changes: 1 addition & 1 deletion src/garden/units.clj
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@

(defmacro defunit
"Create a suite of functions for unit creation, conversion, validation, and
arithemetic."
arithmetic."
([name]
`(defunit ~name ~name))
([name unit]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(ns garden.arithemetic-test
(ns garden.arithmetic-test
(:refer-clojure :exclude [+ - * /])
(:require [garden.units :as u]
[garden.color :as c])
(:use clojure.test
garden.arithemetic))
garden.arithmetic))

(deftest sum-test
(testing "numbers"
Expand Down

0 comments on commit 4b2ea8e

Please sign in to comment.