diff --git a/src/re_frame/handlers.cljs b/src/re_frame/handlers.cljs index 07fd2d5..495dd43 100644 --- a/src/re_frame/handlers.cljs +++ b/src/re_frame/handlers.cljs @@ -7,9 +7,9 @@ (defn comp-middleware "Given a vector of middleware, filter out any nils, and use \"comp\" to compose the elements. - v can have nested vectors, and will be flattended before \"comp\" is applied. + v can have nested vectors, and will be flattened before \"comp\" is applied. For convienience, if v is a function (assumed to be middleware already), just return it. - Filtering out nils allows us to create Middlewhere conditionally like this: + Filtering out nils allows us to create Middleware conditionally like this: (comp-middleware [pure (when debug? debug)]) ;; that 'when' might leave a nil " [v] @@ -17,7 +17,7 @@ (fn? v) v ;; assumed to be existing middleware (vector? v) (let [v (remove nil? (flatten v))] (cond - (empty? v) identity ;; noop middleware + (empty? v) identity ;; no-op middleware (= 1 (count v)) (first v) ;; only one middleware, no composing needed :else (apply comp v))) :else (warn "re-frame: comp-middleware expects a vector, got: " v))) diff --git a/src/re_frame/middleware.cljs b/src/re_frame/middleware.cljs index db54a1e..775c4c5 100644 --- a/src/re_frame/middleware.cljs +++ b/src/re_frame/middleware.cljs @@ -76,7 +76,7 @@ (defn trim-v "Middleware which removes the first element of v, allowing you to write - more asthetically pleasing handlers. No leading underscore on the event-v! + more aesthetically pleasing handlers. No leading underscore on the event-v! Your handlers will look like this: (defn my-handler [db [x y z]] ;; <-- instead of [_ x y z] diff --git a/src/re_frame/router.cljs b/src/re_frame/router.cljs index 0fc8ebc..0a39804 100644 --- a/src/re_frame/router.cljs +++ b/src/re_frame/router.cljs @@ -16,12 +16,12 @@ ;; -- router loop --------------------------------------------------------------------------------- ;; -;; In a perpretual loop, read events from "event-chan", and call the right handler. +;; In a perpetual loop, read events from "event-chan", and call the right handler. ;; ;; Because handlers occupy the CPU, before each event is handled, hand ;; back control to the browser, via a (