Returns a particular kind of Seq based on the input.
If a Seq, that same Seq.
If an Collection, a Seq of the same kind (Keyed, Indexed, or Set).
If an Array-like, an Seq.Indexed.
If an Iterable Object, an Seq.Indexed.
If an Object, a Seq.Keyed.
Note: An Iterator itself will be treated as an object, becoming a Seq.Keyed,
which is usually not what you want. You should turn your Iterator Object into
an iterable object by defining a Symbol.iterator (or @@iterator) method which
returns this.
Note: Seq is a conversion function and not a class, and does not use the
new keyword during construction.
Creates a Seq.
Returns a particular kind of
Seq
based on the input.Seq
, that sameSeq
.Collection
, aSeq
of the same kind (Keyed, Indexed, or Set).Seq.Indexed
.Seq.Indexed
.Seq.Keyed
.Note: An Iterator itself will be treated as an object, becoming a
Seq.Keyed
, which is usually not what you want. You should turn your Iterator Object into an iterable object by defining a Symbol.iterator (or @@iterator) method which returnsthis
.Note:
Seq
is a conversion function and not a class, and does not use thenew
keyword during construction.