I suppose that works, but it seems a little inelegant to do this:
(prewalk #(if (sequential? %) % (f %)) xs)
instead of just
(prewalk f xs)

On Tuesday, 27 August 2013 20:06:38 UTC-7, gfredericks wrote:
>
> Clojure.walk
> On Aug 27, 2013 10:05 PM, "JvJ" <kfjwh...@gmail.com <javascript:>> wrote:
>
>> I feel like this question has been asked about a trillion times, but I 
>> was having a hard time finding a straight answer.  Is there a really 
>> straightforward way in the standard library or in one of the contrib 
>> libraries to do something like this:
>> (nested-map inc '(1 (2 3) (4 (5 (6))))) ===> '(2 (3 4) (5 (6 (7))))
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to