BG : I guess I need to walk the whole tree. I came across such problem when using enlive to scrape a news page. enlive creates a hash map of entire html and then you can pull out stuff using css style selectors. there were things i couldn't do using the supplied selector methods and i felt the need to walk the tree myself. i created the dining- table to understand how to transform a hash map.
On May 28, 3:56 am, Baishampayan Ghose <b.gh...@gmail.com> wrote: > That's definitely possible but you'll have to walk the whole tree. Do > you really want to go that route? > > Regards, > BG > > > > > > > > > > On Mon, May 28, 2012 at 1:25 PM, Z.A <zahmed...@gmail.com> wrote: > > Thanks BG . But can we do it without hard wiring the structure of hash > > map in our function. Can't we just take in any hash map and look for > > any :sour key anywhere and remove it. I want to learn a generic hash > > map processing technique. > > > On May 28, 3:46 am, Baishampayan Ghose <b.gh...@gmail.com> wrote: > >> This is the trivial solution, by the way - > > >> (update-in dining-table [:eatables :fruits] #(dissoc % :sour)) > > >> Regards, > >> BG > > >> On Mon, May 28, 2012 at 1:11 PM, Z.A <zahmed...@gmail.com> wrote: > >> > Hi > >> > I am trying to create a function to remove all :sour eatables from my > >> > dining table but so far only getting sour results. > > >> > (def dining-table {:drinks {:cold "coke", :hot "tea"}, :eatables > >> > {:fruits {:sour "lemon", :sweet "mango"}}}) > > >> > (the-function-i-want dining-table) should give the following output > > >> > {:drinks {:cold "coke", :hot "tea"}, :eatables {:fruits { :sweet > >> > "mango"}}} > > >> > thank you all. > >> > Zubair > > >> > -- > >> > 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 > > >> -- > >> Baishampayan Ghose > >> b.ghose at gmail.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 > > -- > Baishampayan Ghose > b.ghose at gmail.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