In https://github.com/jaycfields/jry I define update values, which allows you
to
(update-values {:a 1 :b 2} inc) ;=> {:a 2 :b 3}
I've used that in combination with update-in to do all sorts of
transformations.
That is obviously designed for maps, which is what your example looks like to
me. (
Looks like a good addition for 4clojure.
On Jul 19, 2012 8:36 PM, "Alan Malloy" wrote:
> No, but it's pretty easy to write:
>
> (defn map-depth [f coll depth]
> (if (zero? depth)
> (map f coll)
> (for [x coll]
> (map-depth f x (dec depth)
>
> On Tuesday, July 17, 2012 7:17:19
No, but it's pretty easy to write:
(defn map-depth [f coll depth]
(if (zero? depth)
(map f coll)
(for [x coll]
(map-depth f x (dec depth)
On Tuesday, July 17, 2012 7:17:19 PM UTC-7, Seth Chandler wrote:
>
> I'm new both to Clojure and to this group, so please be gentle. I com
Hey Seth,
Welcome to the party.
I haven't seen something like this either.
What clojure's map does with additional arguments its pretty useful though.
(map f a b c) is equivalent to
f@@@Transpose[{a,b,c}]
Still, it would be nice to have mathematica-style list manipulation
functions, that suppo
I'm new both to Clojure and to this group, so please be gentle. I come to
Clojure mostly from a Mathematica background, which has a certain Lispyness
to it. One of the things one can do in Mathematica is to map a function to
an s-expression but not at its top level, but rather at some user spe