On Fri, Dec 12, 2008 at 11:08 AM, Rich Hickey <[email protected]> wrote:
> On Fri, Dec 12, 2008 at 11:03 AM, Stephen C. Gilardi <[email protected]> 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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---