the function cleans up slightly with cond->. I don't think you can get
around having to specify how to recognize a leaf, for any general solution.


On Tue, Aug 27, 2013 at 10:27 PM, JvJ <kfjwhee...@gmail.com> wrote:

> 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> 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
>>>
>>> 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
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/clojure?hl=en<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.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<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.
>



-- 
Gary Fredericks
(803)-295-0195
fredericksg...@gmail.com
www.gfredericks.com

-- 
-- 
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