clojure.core.incubator:
https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/incubator.clj#L77
On Mon, Nov 26, 2012 at 1:51 PM, Frank Siebenlist <
frank.siebenl...@gmail.com> wrote:
> Guess we need a test for "seq'able" ;-)
>
> -FS.
>
>
> On Nov 26, 2012, at 1:47 P
Guess we need a test for "seq'able" ;-)
-FS.
On Nov 26, 2012, at 1:47 PM, Herwig Hochleitner wrote:
> 2012/11/26 Philip Potter
> > Since ISeq already is a seq and IPersistentCollection derives from Sequable,
> > both will succeed in a seq call.
>
> A Seqable isn't necessarily a seq:
>
> Did
2012/11/26 Philip Potter
> > Since ISeq already is a seq and IPersistentCollection derives from
> Sequable,
> > both will succeed in a seq call.
>
> A Seqable isn't necessarily a seq:
>
Didn't say that, but Sequable defines the .seq() method, so it will succeed
in a seq call.
--
You received
On 26 November 2012 21:11, Herwig Hochleitner wrote:
> seq?, sequential? and coll? are the predicates for ISeq, Sequential and
> IPersistentCollection, respectively.
>
> Sequential is just a marker interface which doesn't promise anything but a
> defined order of elements.
> Since ISeq already is
seq?, sequential? and coll? are the predicates for ISeq, Sequential and
IPersistentCollection, respectively.
Sequential is just a marker interface which doesn't promise anything but a
defined order of elements.
Since ISeq already is a seq and IPersistentCollection derives from
Sequable, both will
A colleague showed me this page recently which seems like a nice quick
reference:
http://www.brainonfire.net/files/seqs-and-colls/main.html
On Mon, Nov 26, 2012 at 6:01 AM, Mark Engelberg wrote:
> I understand that these functions test for different interfaces, but I
> don't have a clear sense
Ooops!!!
No, Mark asked this in his first post...
sorry for the confusion!
Jim
On 26/11/12 14:31, Philip Potter wrote:
On 26 November 2012 14:27, Jim foo.bar wrote:
On 26/11/12 14:19, Philip Potter wrote:
Has anyone compiled a little table of what things satisfy which
predicates?
I don't
On 26 November 2012 14:27, Jim foo.bar wrote:
> On 26/11/12 14:19, Philip Potter wrote:
>>
>> Has anyone compiled a little table of what things satisfy which
>> predicates?
I don't think I wrote this.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
And to answer your original question, ISeq extends
IPersistentCollection, so all seq? should be coll?.
I *think* all concrete ISeqs are Sequential in practice, and all
Sequentials are IPersistentCollections, but I'm not 100%.
Phil
On 26 November 2012 14:01, Mark Engelberg wrote:
> I understand
On 26/11/12 14:19, Philip Potter wrote:
Has anyone compiled a little table of what things satisfy which predicates?
I'm not 100% sure, but I think "Clojure Programming " has a table like
this...I can confirm as soon as I get back home...
Jim
--
You received this message because you are subs
I think seq? and coll? are pretty self-explanatory - they test if it
is a valid seq or collection respectively.
Sequential seems to be an equality partition of some sort -- ie two
Sequentials with the same contents in the same order should compare
equal -- but in my view if you ever have a Sequent
My understanding is that everything (all data-structures) is coll?
(obviously not strings)
lists and vectors are sequential? (and coll?)
sets are only coll?
maps are map? (and coll?)
All seq? are sequential?
Yes and also coll?
All sequential? are coll?
Well yeah but not only...all persisten
I understand that these functions test for different interfaces, but I
don't have a clear sense for which things respond differently to these
predicates. Has anyone compiled a little table of what things satisfy
which predicates?
So far, I've figured out that although lists, strings, vectors, and
I had some code that adapted to functions that returned either a map or a
seq of maps.
I was using (seq?) and (map?) to analyze the return value.
It then blew up when a function returned a clojure.lang.IPersistentVector.
Fortunately, (sequential?) is a super-set of (seq?) and matched this
proper
14 matches
Mail list logo