Hi,
Am 05.06.2009 um 00:22 schrieb Meikel Brandmeyer:
sym-vals(apply hash-map (interleave syms
values))
Ah! I always forget about zipmap...
Clojure is just fun! :)
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
I'm writing a numerical methods library, and I already found a use for
you macro. Here's the old way:
(defn solve
[f & params]
(let [param-map (merge
{:start 1
:target 0
:diff-method :forward
:iter-method :new
On Jun 4, 2009, at 6:54 PM, Sean Devlin wrote:
Gut gemacht!
Absolutely amazing Meikel. Now get some well earned sleep.
Sean
I agree. It's a really beautiful piece of code, packed full of Clojure
goodness.
Nicely done!
I checked it into clojure.contrib.def:
http://code.google.
Gut gemacht!
Absolutely amazing Meikel. Now get some well earned sleep.
Sean
On Jun 4, 6:22 pm, Meikel Brandmeyer wrote:
> Hi again,
>
> Am 05.06.2009 um 00:06 schrieb Meikel Brandmeyer:
>
> > The docstring is a bit contorted but I'm too sleepy now,
> > to get that right...
>
> And of course
Hi again,
Am 05.06.2009 um 00:06 schrieb Meikel Brandmeyer:
The docstring is a bit contorted but I'm too sleepy now,
to get that right...
And of course I'm too sleepy to miss the keyword to
symbol conversion
(defmacro defnk
"Define a function accepting keyword arguments. Symbols up to
Hello Stephen,
the following is a macro defining a function with keyword
arguments. It is called like this:
(defnk foo
[a b c :x 1 :z 2]
(println x z))
a, b and c denote positional arguments, 1 and 2 are default
values for x resp. z. This pattern came up several times now,
and there were al