Looks really nice, thanks for sharing!

On Thursday, 20 November 2014, Alex Baranosky <alexander.barano...@gmail.com>
wrote:

> Hi guys,
>
> I've further refined my print.foo project, and thought I'd share the
> latest version here with you all. I get a ton of mileage out of the library
> personally and professionally using it everyday to enhance my repl-driven
> development.
>
> Here some highlights from the README (you can read a complete set of
> examples on the Github README @
> https://github.com/AlexBaranosky/print-foo#usage):
>
> print.foo=> (print-sexp (str (+ 3 4) (+ 5 (* 6 2)) 4))
> 3 3
> 4 4
> (+ 3 4) 7
> 5 5
> 6 6
> 2 2
> (* 6 2) 12
> (+ 5 (* 6 2)) 17
> 4 4
> (str (+ 3 4) (+ 5 (* 6 2)) 4) "7174"
>
>
> print.foo=> (print-> 1 inc dec inc dec)
> 1 1
> inc 2
> dec 1
> inc 2
> dec 1
> 1
>
>
> print.foo=> (print-cond-> {}
>                           (pos? 1)
>                           (assoc :a 1)
>
>                           (pos? 2)
>                           (merge {:b 2})
>
>                           (neg? 2)
>                           (merge {:c 3}))
> test: (pos? 1)  value: {:a 1}
> test: (pos? 2)  value: {:a 1, :b 2}
> {:b 2, :a 1}
>
>
> print.foo> (middleware->
>             {:get-in [:session]
>              :timings? true}}
>             my-handler
>             wrap-exception-handling
>             wrap-params)
>
> (defn m1 [x]
>   (println x)
>   x)
> (defn m2 [x]
>   (fn [y]
>     (x (assoc y :m2 true))))
> (defn m3 [x]
>   (fn [y]
>     (x (assoc y :m3 true))))
>
> ((middleware-> {:timings? false
>                 :get-in [:session]}
>                m1
>                m2
>                m3)
>
>  {:session {:token 1}})
>
> ;; prints:
>
> "REQUEST - GOING INTO: m3"
> {:token 1}
> "REQUEST - GOING INTO: m2"
> {:token 1}
> {:m2 true, :m3 true, :session {:token 1}}
> "RESPONSE - COMING OUT OF: m2"
> {:token 1}
> "RESPONSE - COMING OUT OF: m3"
> {:token 1}
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure@googlegroups.com');>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to