I don't know if it's more common or not, but I tend to use (:key map) most
of the time, because it's a visual cue that I'm getting some key from a
map. Whenever you see (:key something), you know that you're getting the
:key field from something. When you see (something :key), you have to be
more
Depending on what you're trying to do with paths, you may want to construct
File objects and then get the paths from them. For example,
(let [home (File. "/Users/Bill")
bashrc (File . home ".bashrc")]
(.getPath bashrc))
I think that tends to be less cumbersome than stringing path compo
ith 1 argument, then the body of the function is:
>
> (factorial n 1)
>
> But if it is called with 2 arguments then the body of the function
> is:
>
> (if (= n 0) acc
> (recur (dec n) (* acc n)))
>
> Is this a standard feature of lisp? Sorry I am very noob
That's defining a function factorial that can be called with either one or
two arguments. When called with one argument, it immediately calls itself
with two arguments. So the (factorial n 1) call provides acc with an
initial value of 1. The ([n] and ([n acc] lines are the declarations of the
pa
I believe it stands for "member function". From the doc string:
"Expands into code that creates a fn that expects to be passed an
object and any args and calls the named instance method on the
object passing the args. Use when you want to treat a Java method as
a first-class fn."
On Mon,
Hi,
Is anyone aware of a pretty-print function for Clojure? I saw there
was some discussion about it on this thread a while ago, but I don't
seem to see anything related to pretty-print in either the core or
clojure-contrib. If no one's working on implementing it, I might take
a stab at it.
Than
I'm working on a project that has both Java and Clojure sources. We
use Maven as our build system, and I'd like to use it to compile the
Clojure sources. Has anyone done that before? I can think of a few
ways to do it, such as using maven to run an ant task or writing a
plugin, but I'm not sure wh
I've never done that in Clojure, but another developer at the company
I work for made a java utility that allows you to refer to classpath
resources as URLs. It's on sourceforge in a package called "OpenHMS
Common Utilities":
http://openhms.sourceforge.net/common-util/
There's a class called
com
That's great, thanks!
On Mon, Nov 10, 2008 at 11:15 PM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 10, 9:38 pm, "Mike DeLaurentis" <[EMAIL PROTECTED]> wrote:
>> Hi Rich,
>>
>> I'm giving a talk about Clojure tomorrow ni
Hi Rich,
I'm giving a talk about Clojure tomorrow night in Philadelphia for a
functional programming user group, and I'd like to include some
information about you. Do you have a standard bio you use for things
like that? Just a few sentences about your background and your
motivation for writing
10 matches
Mail list logo