Mark,
You can read some about destructuring in the documentation for the
special form "let":
http://clojure.org/special_forms#let
You can also explore the functionality at the repl:
user=> (destructure '[{x :x, y :y, :or {y 3}} given])
[map__59 given y (clojure.core/get map__59 :y 3) x (clojure
On Nov 17, 5:16 pm, "Mark Volkmann" <[EMAIL PROTECTED]> wrote:
> On Mon, Nov 17, 2008 at 3:48 PM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> > On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote:
> >> Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b...,
> >> the following
Ah! Thank you.
On Nov 17, 2:48 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote:
>
> > Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b...,
> > the following example was given:
>
> > (defn test1 [{x :x, y :y, :or {:y 3}}]
> >
On Mon, Nov 17, 2008 at 3:48 PM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote:
>> Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b...,
>> the following example was given:
>>
>> (defn test1 [{x :x, y :y, :or {:y 3}}]
>>
On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote:
> Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b...,
> the following example was given:
>
> (defn test1 [{x :x, y :y, :or {:y 3}}]
> [x y])
> (test1 {:x 2}) => [2 3]
>
> But this doesn't work on the latest Clo
In http://groups.google.com/group/clojure/browse_thread/thread/62140a28b8d4ef36,
the following example was given:
(defn test1 [{x :x, y :y, :or {:y 3}}]
[x y])
(test1 {:x 2}) => [2 3]
But this doesn't work on the latest Clojure from Subversion I just
got:
(test1 {:x 2}) => [2 nil]
Was