aspose file tools*
The moose likes Clojure and the fly likes Building Functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Building Functions" Watch "Building Functions" New topic
Author

Building Functions

mss sanders
Greenhorn

Joined: Feb 15, 2011
Posts: 2
Hi folks!

Question... (very much a Clojure newbie) but, how do I wrap the following in a stand alone function?



My problem (I'm thinking) is that when I attempt to wrap the above in its own function, Clojure seems to insist that I ought to pass arguments to the function. In fact, I want to pass zero arity (no args).
mss sanders
Greenhorn

Joined: Feb 15, 2011
Posts: 2
I believe I've got it up & running now... The 'trick' was to wrap the empty vector list in their own parenthesis ([]), as shown below:



So for the false alarm there...
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Since you are not defining different arities, you can simply drops the parentheses around [ ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building Functions