Nice, thanks... :)
I've started writing a very similar namespace but instead of printing, I'm timing...would you be interested in including a time-foo.clj following the same pattern (append 'time-') in your little library? I've only got 'time-let' which is the one I mostly use but I can imagine it shouldn't be too hard to do the same on the threading macros, cond etc. Also if I face any problems there is always your code to guide me...

Jim


On 28/03/13 05:42, Alex Baranosky wrote:
print-foo is a small library useful when debugging code, or at the REPL when writing your code.

https://github.com/AlexBaranosky/print-foo

It is a collection of macros that mimic basic clojure macros like defn, let, or ->, but which prints the value of the code at each point in the transformation. This is more convenient than printlning. (See the readme for a complete list.)

print-> is especially convenient.

user=>  (print->  1  inc dec incdec)
1  1
inc2
dec1
inc2
dec1
1

The only macro in the bunch that is not simply a clojure macro with "print-" appended is print-sexp which takes an arbitrary s-expression and prints out the values of every sub-sexp, like this:

user=>  (print-sexp  (str(+3  4)  (+5  (*6  2))  4))
(+3  4)  7
(*6  2)  12
(+5  (*6  2))  17
(str(+3  4)  (+5  (*6  2))  4)  "7174"
"7174"
Enjoy :)
Alex
--
--
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/groups/opt_out.



--
--
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/groups/opt_out.


Reply via email to