:12 UTC-4, Pierre-Henry Perret wrote:
>
> A form like:
>
> (def lazy2 (map #(str "+" %) (range)))
>
> would work.
>
> Le mercredi 6 juin 2012 11:24:06 UTC+2, Z.A a écrit :
>>
>> Hi
>>
>> user=> (def lazy1(take3 (iterate#
Hi
user=> (def lazy1(take3 (iterate#(do (print "+")
(inc %))0)))
#'user/lazy1
user=> lazy1
(+0+1 2)
Why am I not getting (+0+1+2) ?
Thanks
Zubair
PS: I am reading chapter 6 of 'The Joy of Clojure' and trying to understand
"rest versus next" , pp 1
BG: Thanks a lot.
Regards
Zubair
On May 28, 4:16 am, Baishampayan Ghose wrote:
> Ok. I hope the postwalk example will solve your problem.
>
> Regards,
> BG
>
>
>
>
>
>
>
>
>
> On Mon, May 28, 2012 at 1:45 PM, Z.A wrote:
> > BG : I guess I need to
ods from the table."
> [table]
> (let [xform (fn [[k v]] (when-not (= k :sour) [k v]))]
> (walk/postwalk (fn [x] (if (map? x) (into {} (keep xform x)) x)) table)))
>
> Hope this helps.
>
> Regards,
> BG
>
>
>
>
>
>
>
>
>
> On Mon,
BG
>
>
>
>
>
>
>
>
>
> On Mon, May 28, 2012 at 1:25 PM, Z.A 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 r
s 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 wrote:
> > Hi
> > I am trying to create a function to r
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
gt;
> [1]https://github.com/semperos/clj-webdriver
>
>
>
>
>
>
>
> On Wednesday, May 16, 2012 2:33:05 AM UTC-7, Z.A wrote:
>
> > Hi
> > Is there a good Clojure lib for web scraping. I intend to collect
> > story links using regex from a news site
Hi
Is there a good Clojure lib for web scraping. I intend to collect
story links using regex from a news site's home page, then visit each
link to gather photos and text.
Thanks
Zubair
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this g