(defmacro dbg [x]
  `(let [x# ~x]
    (println (str *file* ":") "[" '~x "=>" x# "]")
    x#))

Without the line number, because I don't know how to retrieve (neither
could I find anything on it).


On Dec 15, 6:48 am, jaime <xiejianm...@gmail.com> 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 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

Reply via email to