Great! that's exactly what I want. Thank you! This is the first time I meet "&form", is there any document about this 'form' or relevant things?
On 12月15日, 下午9时19分, Jay Fields <[email protected]> wrote: > This should get you started: > > (defmacro debug [x] > (println x) > (println (pr-str &form)) > (println *file*) > (println (meta &form))) > > > > > > > > On Thu, Dec 15, 2011 at 12:48 AM, jaime <[email protected]> wrote: > > Hello there, > > > I want to write a function named "debug" which will print out "date- > > time msg + current source-line + etc. info", but I don't know how to > > get the current source and line number of the running point (just like > > what REPL does when encounter any exceptions) ... > > > Got any ideas? > > > Thanks! > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > [email protected] > > 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 [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
