On Fri, Dec 12, 2008 at 11:08 AM, Rich Hickey <richhic...@gmail.com> wrote:
> On Fri, Dec 12, 2008 at 11:03 AM, Stephen C. Gilardi <squee...@mac.com> wrote:
>>
>> 'do' doesn't work when an early form uses a namespace and a later form
>> depends on that.
>>
>> java -cp clojure.jar clojure.main -e "(use 'clojure.set)" -e "(union
>> #{:a} #{:b})"
>>
>> works.
>>
>> java -cp clojure.jar clojure.main -e "(do (use 'clojure.set) (union
>> #{:a} #{:b}))"
>>
>> fails.
>
> I have to say I find calls to use and other multi-step operations as
> command-line args baffling. Who needs this?

I don't know that it's necessary, but I found it convenient when
throwing together a script to launch the repl:

kant[~/src/clojure]$ cat ~/bin/iclj
#!/bin/sh

rlwrap clojure -e "(use 'clojure.contrib.repl-ln)" \
               -e "(repl)"                         \
               -e "(set! *print-length* 20)"

- J.

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