As I said, the example was stripped down for simplicity, and that
simple version doesn't make much sense other than for communicating my
problem.

My real val-fn is not a map, it's indeed a couple of functions,
applied to some data that's passed in. But the result of that acts
like a map: it returns a value for a key. So I will check whether it
makes sense to turn the results of these computations into something
'associative', so that I can use clojure's builtin destructuring,
which is a really great feature and I guess pretty unique amongst
Lisps, although Lisps make it easy to add that via macros (as I just
proved :). My macro's destructuring features are of course much more
limited than Clojure's.

On Jul 19, 5:07 am, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi Jarkko,
>
> Am 18.07.2009 um 22:02 schrieb Jarkko Oranen:
>
> > That looks a lot like map destructuring, though:
>
> > (let [{:keys [a b c]} {:a 1 :b 2 :c 3}]
> >  (list a b c))
>
> > -> (1 2 3)
>
> Yes. But val-fn might also be exactly that: a function
> which gets the value by some others means than
> a map. I'm not sure about that, because OP named
> the argument val-fn, not val-map or so.
>
> If it's always a map, one could use map-destructuring, yes.
>
> Sincerely
> Meikel
>
>  smime.p7s
> 2KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to