Hi Rafik,
Congratulations, the book looks very interesting - lots of advanced topics
there. It's nice to see more diverse books for Clojure, thanks!
Cheers,
Colin
On 20 August 2015 at 13:21, Rafik NACCACHE wrote:
> Hi Guys,
>
> I am proud to let you know that my book dealing about advanced alg
I've been using Java class ItreratorSequence in package clojure.lang. But
then I noticed that this class is not referenced anywhere. Is this dead
code or otherwise not supported? I had been planning on subclassing this
code.
--
You received this message because you are subscribed to the Google
Oh! First, let me correct. I'm referring to IteratorSeq in clojure.lang.
The constructor is package scoped, so I'll need to copy the code instead of
subclassing. (Or convert it to Clojure.) So my question really is if the
code is outdated? Seems to run fine for my limited tests so far. But I
wo
William,
https://clojuredocs.org/clojure.core/iterator-seq previously used it,
but as of this commit:
https://github.com/clojure/clojure/commit/c47e1bbcfa227723df28d1c9e0a6df2bcb0fecc1
uses RT/chunkIteratorSeq
http://dev.clojure.org/jira/browse/CLJ-1669 : "IteratorSeq will no
longer be used but i
I would consider IteratorSeq to be deprecated and a candidate for removal, so
subclass at your own risk.
Alex
--
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 memb
Counterclockwise, the Eclipse Clojure development tool.
Counterclockwise 0.34.0 has been released.
Highlights:
- Resource hyperlinks: you can Cmd+Clik (or F3) on string literals that
represent resources, they will be open. Searches for files relative to the
current file, or the classpath, or the
Thanks!
On Friday, August 21, 2015 at 7:54:04 AM UTC-4, Moe Aboulkheir wrote:
>
> William,
>
> https://clojuredocs.org/clojure.core/iterator-seq previously used it,
> but as of this commit:
>
> https://github.com/clojure/clojure/commit/c47e1bbcfa227723df28d1c9e0a6df2bcb0fecc1
>
> uses RT/chun
Deprecated is fine. It can not be sub-classed as it has package-scoped
methods. Am rewriting it in Clojure, which is a great exercise for this raw
newbie.
Thanks! Only I was worried if it is out of date, which it is not looking
like for now.
On Friday, August 21, 2015 at 8:04:16 AM UTC-4, Alex
Yes, that does the job. Thanks for your help and time.
On Thursday, August 20, 2015 at 12:21:47 AM UTC+2, Alan Forrester wrote:
>
> On 19 Aug 2015, at 18:08, Hussein B. >
> wrote:
>
> > Here is more concrete example
> >
> > (def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4
> "ch
Hi,
I have this structure:
(def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children"
[]}]} {"n" {"id" "b"} "d" 3 "children" []}])
And I wrote a function with zippers to traverse it:
(defn traverse [col]
(loop [z col]
(if (= (z/next z) z)
z
(if (z/branch? z)
Hussein,
The println inside (recur) will return nil.
Take care,
Moe
On Fri, Aug 21, 2015 at 4:35 PM, Hussein B. wrote:
> Hi,
>
> I have this structure:
>
> (def s [{"n" {"id" "a"} "d" 2 "children" [{"n" {"id" "c"} "d" 4 "children"
> []}]} {"n" {"id" "b"} "d" 3 "children" []}])
>
>
>
> And I wro
I recall a while ago running into this. I ended up with the following:
(defn stop?
"Returns true if there is no point continuing past the specified loc.
loc may be null or (z/end?).
This is only here because z/up returns nil rather than something (z/end? will
work with)."
[loc]
(or (n
Hi,
I changed println to z/node , this time I'm getting:
NullPointerException clojure.zip/branch? (zip.clj:73)
On Friday, August 21, 2015 at 5:56:10 PM UTC+2, Moe Aboulkheir wrote:
>
> Hussein,
>
> The println inside (recur) will return nil.
>
> Take care,
> Moe
>
> On Fri, Aug 21, 2015 at
Hussein,
How are you constructing your zipper, before passing it to traverse?
Note that clojure.zip doesn't work on arbitrary data structures
without being given some information about how to descend
into/construct nodes, etc. - i.e. z/next expects a zipper, and your
data structure isn't a zipper,
Here is my zipper:
(z/zipper #(contains? % "children") #(get % "children") (fn [_ c] c) s)
On Friday, August 21, 2015 at 6:49:25 PM UTC+2, Moe Aboulkheir wrote:
>
> Hussein,
>
> How are you constructing your zipper, before passing it to traverse?
> Note that clojure.zip doesn't work on arbitr
Hussein,
I don't get an NPE passing that to traverse, but nothing much
interesting happens either. The top-level data structure (and the
vectors within "children") aren't associative, and so don't pass the
branch? test (contains? % "children").
You could certainly extend the zipper to cover both
16 matches
Mail list logo