I see you have defined a print-and-return macro; you might prefer my
and-print:
(defmacro and-print
"A useful debugging tool when you can't figure out what's going on:
wrap a form with and-print, and the form will be printed alongside
its result. The result will still be passed along."
[val]
`(let [x# ~val]
(println '~val "is" x#)
x#))
I'm not sure what you're using the flag argument for; if it's to keep
track of what prints belong to what statements then my automatic
printing of the input form might be useful for you.
I'd pull the (repeat blah blah blah) stuff in with-separator out into
an optional argument, so that (a) you only have to write it once, and
(b) you can use a different separator easily.
I find the map in local-bindings pretty hard to read - what on earth
is `'~x# for? Without trying to understand what you're doing, it seems
like you could gain readability by replacing (list 'println [`'~x#
x#]) with `(println ['~x# x#])
On Nov 28, 12:32 am, Sunil S Nandihalli <
sunil.nandiha...@gmail.com>
wrote:
> > >
clojure+u...@googlegroups.com<
clojure%2Bunsu...@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 post to this group, send email to
clo...@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+u...@googlegroups.com<
clojure%2Bunsu...@googlegroups.com>