Hi, 
is there a function to determine if the clojure code is running as library 
or as script ? 

In ruby, there is 

if __FILE__==$0
  # this will only run if the script was the main, not load'd or require'dend

In Java, we could include main method in class, and choose to run it,

How about clojure ?

Is there any function/macro like the following ?

(run-main 
  (code ......))  


so that it can be run standalone, or it can be ignored running as 
library.   I find this useful for quick experimenting.

thank


-- 
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