Sequ

ostrat.Sequ
trait Sequ[+A] extends SeqLikeBacked[A]

This the base trait for all efficient sequence collections based on Array like classes, Arrays, ArrayBuffers etc. The final classes compile time wrap the platform Array and buffer classes. So currently there are just two classes for each type A, An ArrImut that wraps a standard immutable Array to produce an immutable array, and a ArrBuff that wraps an ArrayBuffer. Currently, this just in a standard ArrayBuffer. Where A is a compound value types or an AnyVal type. Note there is no generalised sumBy[B](f: A => B): B, method included, as it is more runtime efficient to include this as an extension method in the B companion object of the user created types.

Attributes

Graph
Supertypes
trait SeqLikeBacked[A]
trait SeqLike[A]
class Any
Known subtypes
trait Arr[A]
trait LSegArrBase[VT, A]
trait ArrLSegDblN[VT, A]
trait ArrLSegDbl4[VT, A]
class LineSegLLArr
class LSeg2Arr
trait ArrLSegDbl6[VT, A]
trait LineSegLen2Arr[VT]
class LineSegM2Arr
trait ArrArrayDbl[A]
class PolygonLLArr
class PolygonM2Arr
class PolygonM3Arr
trait ArrArrayInt[A]
class HStepArrArr
class HStepPathArr
class PolygonHCArr
trait ArrNoParam[A]
trait ArrValueN[A]
trait ArrDblN[A]
trait ArrDbl1[A]
class AngleArr
trait ArrDbl2[A]
class LatLongArr
class Pt2Arr
class PtFm2Arr
class PtKm2Arr
class PtM2Arr
class PtPm2Arr
class Vec2Arr
class VecFm2Arr
class VecKm2Arr
class VecM2Arr
class VecPm2Arr
class MyDbl2Arr
trait ArrDbl3[A]
class Pt3Arr
class PtKm3Arr
class PtM3Arr
trait ArrDbl4[A]
trait ArrDbl5[A]
trait ArrDbl6[A]
class LineSegM3Arr
trait ArrDbl7[A]
trait ArrIntN[A]
trait ArrInt1[A]
class HStepArr
class HStepLikeArr
class HVDirnArr
class SqStepArr
class ColourArr
trait ArrInt2[A]
class HCenArr
class HCoordArr
class HSepArr
class HVertArr
class SqCenArr
class SqCoordArr
class SqVertArr
trait ArrInt3[A]
class HCenRowArr
class HCenStepArr
class HStepCenArr
class HvOffsetArr
class SqCenStepArr
trait ArrInt4[A]
class LineSegHCArr
class LineSegSCArr
trait ArrInt5[A]
trait ArrInt6[A]
trait ArrLongN[A]
trait ArrLong1[A]
class BoolArr
class CharArr
class DblArr
class FloatArr
class IntArr
class LongArr
class StrArr
trait ArrPair[A1, A1Arr, A2, A]
trait ArrPairFinalA1[A1, A1Arr, A2, A]
trait LineSegLikePairArr[VT, A1, ArrA1, A2, A]
trait LineSegLikeDblNPairArr[VT, A1, ArrA1, A2, A]
trait LineSegLikeDbl4PairArr[VT, A1, ArrA1, A2, A]
class LineSegPairArr[A2]
trait LineSegLikeIntNPairArr[VT, A1, ArrA1, A2, A]
trait LineSegLikeInt4PairArr[VT, A1, ArrA1, A2, A]
class LineSegHCPairArr[A2]
class LineSegSCPairArr[A2]
trait PointPairArr[A1, ArrA1, A2, A]
trait PointDblNPairArr[A1, ArrA1, A2, A]
trait PointDbl2PairArr[A1, ArrA1, A2, A]
class LatLongPairArr[A2]
class Pt2PairArr[A2]
trait PointDbl3PairArr[A1, ArrA1, A2, A]
class PtKm3PairArr[A2]
class PtM3PairArr[A2]
trait ArrPairDblN[A1, ArrA1, A2, A]
trait ArrPairDbl2[A1, ArrA1, A2, A]
class PtPm2PairArr[A2]
trait ArrPairDbl3[A1, ArrA1, A2, A]
trait ArrPairDbl4[A1, ArrA1, A2, A]
trait ArrPairIntN[A1, ArrA1, A2, A]
trait ArrPairInt1[A1, ArrA1, A2, A]
class HStepPairArr[A2]
trait ArrPairInt2[A1, ArrA1, A2, A]
class HCenPairArr[A2]
class HSepArrPair[A2]
class SqCenPairArr[A2]
trait ArrPairInt3[A1, ArrA1, A2, A]
class HCenStepPairArr[A2]
class SqCenStepPairArr[A2]
trait ArrPairInt4[A1, ArrA1, A2, A]
trait ArrPairSeqLike[A1E, A1, A1Arr, A2, A]
trait PolygonLikePairArr[A1V, A1, A1Arr, A2, A]
trait PolygonLikeDblNPairArr[A1V, A1, ArrA1, A2, A]
class PolygonLLPairArr[A2]
class PolygonKm3PairArr[A2]
trait PolygonLikeDbl2PairArr[A1V, A1, ArrA1, A2, A]
class PolygonFm2PairArr[A2]
class PolygonGenPairArr[A2]
class PolygonKm2PairArr[A2]
class PolygonM2PairArr[A2]
class PolygonPm2PairArr[A2]
class PolygonM3PairArr[A2]
trait PolygonLikeIntNPairArr[A1V, A1, ArrA1, A2, A]
class PolygonHCPairArr[A2]
trait ArrPairSeqLikeDblN[A1E, A1, A1Arr, A2, A]
trait ArrPairSeqLikeIntN[A1E, A1, ArrA1, A2, A]
class ArrPairStr[A2]
trait ArrayIntBackedPairArr[A1, ArrA1, A2, A]
class HStepArrPairArr[A2]
class HStepPathPairArr[A2]
class RPairArr[A1, A2]
class MultipleArr[A]
class RArr[A]
trait Buff[A]
trait ArrayIntBuff[A]
class BooleanBuff
trait BuffArrayDbl[A]
class BuffDbl
trait BuffPair[B1, B2, B]
trait LineSegLikePairBuff[VT, B1, B2, B]
trait BuffPairDblN[A1, A2, A]
trait BuffPairDbl2[A1, A2, A]
class LatLongPairBuff[B2]
class Pt2PairBuff[A2]
class PtPm2PairBuff[B2]
trait BuffPairDbl3[A1, A2, A]
class PtKm3PairBuff[B2]
class PtM3PairBuff[B2]
trait BuffPairDbl4[A1, A2, A]
class LineSegPairBuff[B2]
trait BuffPairIntN[B1, B2, B]
trait BuffPairInt1[A1, A2, A]
class HStepPairBuff[A2]
trait BuffPairInt2[A1, A2, A]
class HCenPairBuff[B2]
class HSepBuffPair[B2]
trait BuffPairInt3[A1, A2, A]
class HCenStepPairBuff[A2]
class SqCenStepPairBuff[A2]
trait BuffPairInt4[B1, B2, B]
class LineSegHCPairBuff[B2]
class LineSegSCPairBuff[B2]
trait BuffPairSeqLike[A1E, A1, A2, A]
trait BuffPairSeqLikeDblN[B1E, B1, B2, B]
class PolygonLLPairBuff[A2]
class PolygonFm2PairBuff[A2]
class PolygonGenPairBuff[A2]
class PolygonKm2PairBuff[A2]
class PolygonKm3PairBuff[A2]
class PolygonM2PairBuff[A2]
class PolygonM3PairBuff[A2]
class PolygonPm2PairBuff[A2]
trait BuffPairSeqLikeIntN[B1E, B1, B2, B]
class PolygonHCPairBuff[A2]
class BuffPairStr[B2]
class RPairBuff[B1, B2]
trait BuffValueN[A]
trait BuffDblN[A]
trait BuffDbl2[A]
class LatLongBuff
class BuffPtFm2
class BuffPtKm2
class BuffPtM2
class Pt2Buff
class PtPm2Buff
class Vec2Buff
class VecFm2Buff
class VecKm2Buff
class VecM2Buff
class VecPm2Buff
class MinesBuff
trait BuffDbl4[A]
class LSeg2Buff
trait BuffDbl5[A]
trait BuffDbl6[A]
trait Dbl3Buff[A]
class Pt3Buff
class PtKm3Buff
class PtM3Buff
trait BuffIntN[A]
trait BuffInt1[A]
class HStepBuff
class SqDirnBuff
class ColourBuff
trait BuffInt2[A]
class HCenBuff
class HCoordBuff
class HSepBuff
class HVertBuff
class SqCenBuff
class SqCoordBuff
class SqVertBuff
trait BuffInt3[A]
class HCenRowBuff
class HCenStepBuff
class HStepCenBuff
class HvOffsetBuff
trait BuffInt4[A]
trait BuffInt5[A]
trait BuffInt6[A]
trait BuffLongN[A]
trait BuffLong1[A, ArrA]
class FloatBuff
class IntBuff
class LongBuff
class MultipleBuff[A]
class RBuff[A]
class StringBuff
trait SequPairDblN[A1, A2, A]
trait SequPairDbl2[A1, A2, A]
trait SequPairDbl3[A1, A2, A]
trait SequPairDbl4[A1, A2, A]
trait SequPairIntN[A1, A2, A]
trait SequPairInt1[A1, A2, A]
trait SequPairInt2[A1, A2, A]
trait SequPairInt3[A1, A2, A]
trait SlPairInt4[A1, A2, A]
Show all

Members list

Type members

Types

type ThisT <: Sequ[A]

The final type of this object.

The final type of this object.

Attributes

Value members

Abstract methods

def apply(index: Int): A

Accesses the defining sequence element by a 0 based index.

Accesses the defining sequence element by a 0 based index.

Attributes

def length: Int

The length of this Sequence. This will have the same value as the dataLength property inherited from SeqLike[A].

The length of this Sequence. This will have the same value as the dataLength property inherited from SeqLike[A].

Attributes

Concrete methods

def alphaNatMatch(code: String)(f: A => String): A

Partitions the code and element's Strings into an alphabetic String and a natural number. First matches onth on the alphabetic and then for results that match the same number of letters, it matches on the numbers.

Partitions the code and element's Strings into an alphabetic String and a natural number. First matches onth on the alphabetic and then for results that match the same number of letters, it matches on the numbers.

Attributes

def bestOfGet(init: A)(f1: A => Boolean)(f2: (A, A) => Boolean): A
def collect[B, BB <: Arr[B]](pf: PartialFunction[A, B])(using ev: BuilderArrMap[B, BB]): BB

Collects values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Collects values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Attributes

def contains[A1 >: A](elem: A1): Boolean

Returns true if this sequence contains a value equal to the parameter value. The passed value for equivalence testing can be a super type of the element type.

Returns true if this sequence contains a value equal to the parameter value. The passed value for equivalence testing can be a super type of the element type.

Attributes

def cycleGet(index: Int): A

Applies an index to this ArrayLike collection which cycles back to element 0, when it reaches the end of the collection. Accepts even negative integers as an index value without throwing an exception.

Applies an index to this ArrayLike collection which cycles back to element 0, when it reaches the end of the collection. Accepts even negative integers as an index value without throwing an exception.

Attributes

override def elemsStr: String

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

Attributes

Definition Classes
def empty: Boolean

Is this sequence empty?

Is this sequence empty?

Attributes

def exists(f: A => Boolean): Boolean

Tests if the condition exists for any element of this sequence.

Tests if the condition exists for any element of this sequence.

Attributes

def existsCount(f: A => Boolean): Int

Counts the number of elements that fulfil the condition A => Boolean

Counts the number of elements that fulfil the condition A => Boolean

Attributes

def fMax[B](defaultValue: B)(f: A => B)(using cmp: Ordering[B]): B

Gives the maximum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Gives the maximum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Attributes

def fMin[B](defaultValue: B)(f: A => B)(using cmp: Ordering[B]): B

Gives the minimum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Gives the minimum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Attributes

def filter[ArrA <: Arr[A]](f: A => Boolean)(using ev: BuilderArrMap[A, ArrA]): ArrA
def filterNot[ArrA <: Arr[A]](f: A => Boolean)(using ev: BuilderArrMap[A, ArrA]): ArrA
def filterToList(f: A => Boolean): List[A]
def find(f: A => Boolean): Option[A]

Tries to find te first element of this sequence conforming to the predicate.

Tries to find te first element of this sequence conforming to the predicate.

Attributes

def findSucc[E <: Throwable, B](f: A => ErrBi[E, B]): ErrBi[ExcNotFound.type, B]

Takes a function that returns an ErrBi and returns the first Succ.

Takes a function that returns an ErrBi and returns the first Succ.

Attributes

def flatMap[ArrB <: Arr[_]](f: A => ArrB)(using ev: BuilderArrFlat[ArrB]): ArrB

Specialised flatMap to a Arr.

Specialised flatMap to a Arr.

Attributes

def flatMapErrBiAcc[E <: Throwable, B, BB](f: A => ErrBiAcc[E, B])(using ctE: ClassTag[E], ctB: ClassTag[B]): ErrBiAcc[E, B]

flatMaps each element to an ErrBiAcc accumulating successes and errors.

flatMaps each element to an ErrBiAcc accumulating successes and errors.

Attributes

def flatToIterableMap[B, ArrB <: Arr[B]](f: A => Iterable[B])(using ev: BuilderArrMap[B, ArrB]): ArrB

Maps over a function from A to any Iterable and flattens the result into an RArr[A].

Maps over a function from A to any Iterable and flattens the result into an RArr[A].

Attributes

def foldHeadTail[B](initVal: B)(f: A => B, fAcc: (B, B) => B): B
def foldLeft[B](initial: B)(f: (B, A) => B): B

Folds over this sequence starting with the initial value

Folds over this sequence starting with the initial value

Attributes

def foldLeft[B](f: (B, A) => B)(using ev: DefaultValue[B]): B
def forAll(p: A => Boolean): Boolean

Returns true if the predicate holds true for all values of this sequence, else retruns false.

Returns true if the predicate holds true for all values of this sequence, else retruns false.

Attributes

def foreach[U](f: A => U): Unit

Performs a side effecting function on each element of this sequence in order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Performs a side effecting function on each element of this sequence in order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Attributes

def head: A

The first element of this sequence.

The first element of this sequence.

Attributes

def headFold[B](noHead: => B)(ifHead: A => B): B

Folds over the non-existence / existence of a head element. The first parameter is a value for an empty sequence, the second parameter passed as a separate parameter list is a function on the head element.

Folds over the non-existence / existence of a head element. The first parameter is a value for an empty sequence, the second parameter passed as a separate parameter list is a function on the head element.

Attributes

def headFoldToString[B](noHead: => String): String

Folds over the non-existence / existence of a head element. If the sequence is nonEmpty applies toString to head element else returns the noHead parameter string.

Folds over the non-existence / existence of a head element. If the sequence is nonEmpty applies toString to head element else returns the noHead parameter string.

Attributes

def headOption: Option[A]

Returns the Some of the first element unless the sequence is empty in which case it returns None.

Returns the Some of the first element unless the sequence is empty in which case it returns None.

Attributes

def iFlatMap[ArrB <: Arr[_]](f: (Int, A) => ArrB)(using build: BuilderArrFlat[ArrB]): ArrB

Index with element flatMap. Applies the parameter function to the index and each respective element of this sequence. The function returns a Arr of elements of type B and the method as a whole flattens and then returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Index with element flatMap. Applies the parameter function to the index and each respective element of this sequence. The function returns a Arr of elements of type B and the method as a whole flattens and then returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Attributes

def iFlatMap[ArrB <: Arr[_]](iInit: Int)(f: (Int, A) => ArrB)(using build: BuilderArrFlat[ArrB]): ArrB

Index with element flatMap. Applies the parameter function to the index and each respective element of this sequence. The function returns a Arr of elements of type B and the method as a whole flattens and then returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Index with element flatMap. Applies the parameter function to the index and each respective element of this sequence. The function returns a Arr of elements of type B and the method as a whole flattens and then returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Attributes

def iForAll(p: (Int, A) => Boolean): Boolean

Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def iForeach[U](f: (Int, A) => U): Unit

Index with foreach. Performs a side effecting function on the index and each element of this sequence. It takes a function as a parameter. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach. Performs a side effecting function on the index and each element of this sequence. It takes a function as a parameter. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def iForeach[U](startIndex: Int)(f: (Int, A) => U): Unit

Index with foreach. Performs a side effecting function on the index and each element of this sequence. It takes a function as a parameter. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach. Performs a side effecting function on the index and each element of this sequence. It takes a function as a parameter. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def iMap[B, ArrB <: Arr[B]](f: (Int, A) => B)(using ev: BuilderArrMap[B, ArrB]): ArrB

Index with element map. Applies the parameter function to the index and each respective element of this sequence. The function returns an element of type B and the method as a whole returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods ' (accumulator, element) => B signature. This method should be overridden in subclasses.

Index with element map. Applies the parameter function to the index and each respective element of this sequence. The function returns an element of type B and the method as a whole returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods ' (accumulator, element) => B signature. This method should be overridden in subclasses.

Attributes

def iMap[B, ArrB <: Arr[B]](startindex: Int)(f: (Int, A) => B)(using ev: BuilderArrMap[B, ArrB]): ArrB

Index with element map. Applies the parameter function to the index and each respective element of this sequence. The function returns an element of type B and the method as a whole returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Index with element map. Applies the parameter function to the index and each respective element of this sequence. The function returns an element of type B and the method as a whole returns the specialised Arr of type B. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature. Ideally this method should be overridden in subclasses.

Attributes

def ifHead[U](f: A => U): Unit

if this Sequ is nonEmpty performs the side effecting function on the head. If empty procedure is applied.

if this Sequ is nonEmpty performs the side effecting function on the head. If empty procedure is applied.

Attributes

def indexCycle(index: Int): A

like the apply method accesses the defining sequence element by a 0 based index, but cycles around for indexes less that 0 and equal or greater than index length.

like the apply method accesses the defining sequence element by a 0 based index, but cycles around for indexes less that 0 and equal or greater than index length.

Attributes

def indexMapTo[B, BB <: SeqLikeBacked[B]](iFrom: Int, iTo: Int, iStep: Int)(f: A => B)(using build: BuilderMapSeqLike[B, BB]): BB

A map operation on the range of indexed values, where the return type of the SeqLike is explicitly given by the first parameter.

A map operation on the range of indexed values, where the return type of the SeqLike is explicitly given by the first parameter.

Attributes

def indexOf(elem: A): Int
def indexToForeach[U](iFrom: Int, iTo: Int, iStep: Int)(f: A => U): Unit

Performs a side effecting function on each element of the range of index values for this sequence in order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Performs a side effecting function on each element of the range of index values for this sequence in order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Attributes

def indexWhere(f: A => Boolean): Int

Return the index of the first element where predicate is true, or -1 if predicate not true forall.

Return the index of the first element where predicate is true, or -1 if predicate not true forall.

Attributes

def initForeach[U](f: A => U): Unit

Performs a side effecting function on each element of this sequence excluding the last. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Performs a side effecting function on each element of this sequence excluding the last. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Attributes

def initLastMap[B, ArrB <: Arr[B]](fInit: A => B)(fLast: A => B)(using build: BuilderArrMap[B, ArrB]): ArrB

Specialised map to an immutable Arr of B. But takes 2 functions. Applies the first supplied function to every element of the init of this sequence and the second is applied to the last element if there is one.

Specialised map to an immutable Arr of B. But takes 2 functions. Applies the first supplied function to every element of the init of this sequence and the second is applied to the last element if there is one.

Attributes

def last: A

The last element of this sequence.

The last element of this sequence.

Attributes

def lastFold[B](noLast: => B)(ifLast: A => B): B

Folds over the non-existence / existence of a last element. The first parameter is a value for an empty sequence, the second parameter passed as a separate parameter list is a function on the last element.

Folds over the non-existence / existence of a last element. The first parameter is a value for an empty sequence, the second parameter passed as a separate parameter list is a function on the last element.

Attributes

def lastOption: Option[A]

Returns the Some of the last element unless the sequence is empty in which case it returns None.

Returns the Some of the last element unless the sequence is empty in which case it returns None.

Attributes

def lenStr: String

Just a handy shortcut to give the length of this collection as a string.

Just a handy shortcut to give the length of this collection as a string.

Attributes

def map[B, ArrB <: Arr[B]](f: A => B)(using build: BuilderArrMap[B, ArrB]): ArrB

Specialised map to an immutable Arr of B. Applies the supplied function to every element of this sequence.

Specialised map to an immutable Arr of B. Applies the supplied function to every element of this sequence.

Attributes

def map2To1[B, ArrB <: Arr[B]](f: (A, A) => B)(using ev: BuilderArrMap[B, ArrB]): ArrB

map 2 elements of A to 1 element of B. Ignores the last element on a collection of odd numbered length.

map 2 elements of A to 1 element of B. Ignores the last element on a collection of odd numbered length.

Attributes

def mapArray[B](f: A => B)(using ct: ClassTag[B]): Array[B]

Maps to an Array.

Maps to an Array.

Attributes

def mapCollectSuccs[B, BB <: Arr[B]](f: A => ErrBi[_, B])(using ev: BuilderArrMap[B, BB]): BB

maps from A to ErrBi[B], collects the successful values.

maps from A to ErrBi[B], collects the successful values.

Attributes

def mapErrBi[E <: Throwable, B, ArrB <: Arr[B]](f: A => ErrBi[E, B])(using ev: BuilderArrMap[B, ArrB]): ErrBi[E, ArrB]

Map from A => ErrBi[E, B]. Returns a successful Arr of B as long as the function produces no errors, in which case it returns a Fail of the first error encountered usingly takes a BuilderArrMap. There is a name overload that explicitly takes a more flexible BuilderMap as the first parameter list.

Map from A => ErrBi[E, B]. Returns a successful Arr of B as long as the function produces no errors, in which case it returns a Fail of the first error encountered usingly takes a BuilderArrMap. There is a name overload that explicitly takes a more flexible BuilderMap as the first parameter list.

Attributes

def mapErrBi[E <: Throwable, B, BB](ev: BuilderMap[B, BB])(f: A => ErrBi[E, B]): ErrBi[E, BB]

Map from A => ErrBi[E, B]. There is a name overload that usingly takes a narrower BuilderArrMap as the second parameter list.

Map from A => ErrBi[E, B]. There is a name overload that usingly takes a narrower BuilderArrMap as the second parameter list.

Attributes

def mapErrBiAcc[E <: Throwable, B, BB](f: A => ErrBi[E, B])(using ctE: ClassTag[E], ctB: ClassTag[B]): ErrBiAcc[E, B]

maps each element to an ErrBi accumulating successes and errors.

maps each element to an ErrBi accumulating successes and errors.

Attributes

def mapErrBiList[E <: Throwable, B](f: A => ErrBi[E, B]): ErrBi[E, List[B]]

Map from A => B, returning an ErrBi of List.

Map from A => B, returning an ErrBi of List.

Attributes

def mapList[B <: AnyRef](f: A => B): List[B]

maps this Sequ to a List

maps this Sequ to a List

Attributes

def mapPair[B1, ArrB1 <: Arr[B1], B2, B <: PairFinalA1Elem[B1, B2], ArrB <: ArrPairFinalA1[B1, ArrB1, B2, B]](f1: A => B1)(f2: A => B2)(using build: BuilderMapArrPair[B1, ArrB1, B2, B, ArrB]): ArrB

Specialised map to an immutable ArrPairFinalA1 of B. Applies the supplied function to every element of this sequence.

Specialised map to an immutable ArrPairFinalA1 of B. Applies the supplied function to every element of this sequence.

Attributes

def mapTo[B, BB <: SeqLikeBacked[B]](build: BuilderMapSeqLike[B, BB])(f: A => B): BB

A map operation where the return type of the SeqLike is explicitly given by the second type parameter.

A map operation where the return type of the SeqLike is explicitly given by the second type parameter.

Attributes

def mapUniqueSucc[B](f: A => ErrBi[_, B]): ErrBi[ExcFind, B]

Takes a function from A to ErrBi[?, B]. If the function applied to each element produces a single Good, it is returned else returns Bad.

Takes a function from A to ErrBi[?, B]. If the function applied to each element produces a single Good, it is returned else returns Bad.

Attributes

def mapWithAcc[B, ArrB <: Arr[B], C](initC: C)(f: (C, A) => (B, C))(using ev: BuilderArrMap[B, ArrB]): ArrB

Maps from A to B like normal map,but has an additional accumulator of type C that is discarded once the traversal is completed. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Maps from A to B like normal map,but has an additional accumulator of type C that is discarded once the traversal is completed. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def max[B >: A](using ord: Ordering[B]): A

Gives the maximum value of this sequence according to the implicit ordering type class instance, which can be passed explicitly.

Gives the maximum value of this sequence according to the implicit ordering type class instance, which can be passed explicitly.

Attributes

def min[B >: A](using ord: Ordering[B]): A

Gives the minimum value of this sequence according to the implicit ordering type class instance, which can be passed explicitly.

Gives the minimum value of this sequence according to the implicit ordering type class instance, which can be passed explicitly.

Attributes

def mkStr(separator: String): String

Applies toString to each element and appends them with given separator. There ia name overload where the first paremter is a function to convert the elements into Strings.

Applies toString to each element and appends them with given separator. There ia name overload where the first paremter is a function to convert the elements into Strings.

Attributes

def mkStr(f: A => String, separator: String): String

Applies the function to convert each element to a String and then appends them with the separator. There is a name overload which uses toString to replace the first parameter.

Applies the function to convert each element to a String and then appends them with the separator. There is a name overload which uses toString to replace the first parameter.

Attributes

def mkStrCommas(fToStr: A => String): String

Make a String using comma-space as separators.

Make a String using comma-space as separators.

Attributes

def mkStrJustCommas(fToStr: A => String): String

Make a String using just commas no spaces as separators.

Make a String using just commas no spaces as separators.

Attributes

def mkStrSemis(fToStr: A => String): String

Make a String using semicolon-space as separators.

Make a String using semicolon-space as separators.

Attributes

Is this sequence non-empty?

Is this sequence non-empty?

Attributes

def optAllMap[B, ArrB <: Arr[B]](f: A => Option[B])(using build: BuilderArrMap[B, ArrB]): Option[ArrB]

Takes a map function from A to Option[B] but only returns the Arr of B if all the elements map to a Some. Hence, the ArrB if returned will be the same length as this sequence.

Takes a map function from A to Option[B] but only returns the Arr of B if all the elements map to a Some. Hence, the ArrB if returned will be the same length as this sequence.

Attributes

def optMap[B, ArrB <: Arr[B]](f: A => Option[B])(using build: BuilderArrMap[B, ArrB]): ArrB

Specialised opt map to an immutable Arr of B. Applies the supplied function to every element of this sequence.

Specialised opt map to an immutable Arr of B. Applies the supplied function to every element of this sequence.

Attributes

def partition[ArrA <: Arr[A]](f: A => Boolean)(using build: BuilderArrMap[A, ArrA]): (ArrA, ArrA)

Method for keeping the typer happy when returning this as an instance of ThisT.

Method for keeping the typer happy when returning this as an instance of ThisT.

Attributes

def reverseForeach[U](f: A => U): Unit

Performs a side effecting function on each element of this sequence in reverse order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Performs a side effecting function on each element of this sequence in reverse order. The function may return Unit. If it does return a non-Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Attributes

def reverseIForeach[U](f: (Int, A) => U): Unit

Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

def sumBy(f: A => Int): Int

Sums accumulating the results of the A => Int function.

Sums accumulating the results of the A => Int function.

Attributes

def sumBy(f: A => Double): Double

Sums accumulating the results of the A => Double function.

Sums accumulating the results of the A => Double function.

Attributes

def tailForeach[U](f: A => U): Unit

Foreachs over the tail of this sequence. Performs a side effecting function on each element of this sequence excluding the first.

Foreachs over the tail of this sequence. Performs a side effecting function on each element of this sequence excluding the first.

Attributes

def tailfold[B](initial: B)(f: (B, A) => B): B

foldLeft over the tail of this sequence.

foldLeft over the tail of this sequence.

Attributes

def toList: List[A]

Converts this Sequ to a list.

Converts this Sequ to a list.

Attributes

def toVector: Vector[A]
def zipMap[B, C, ArrC <: Arr[C]](operator: Sequ[B])(f: (A, B) => C)(using ev: BuilderArrMap[C, ArrC]): ArrC

Takes a second collection as a parameter and zips the elements of this collection and the operand collection and applies the specialised map function from type A and type B to type C.

Takes a second collection as a parameter and zips the elements of this collection and the operand collection and applies the specialised map function from type A and type B to type C.

Attributes

def zipMap2[B, C, D, ArrD <: Arr[D]](operator1: Sequ[B], operator2: Sequ[C])(f: (A, B, C) => D)(using ev: BuilderArrMap[D, ArrD]): ArrD

Takes a second collection and third collections as parameters and zips the elements of this collection and the operand collections and applies the specialised map function from type A and type B and type C to type D.

Takes a second collection and third collections as parameters and zips the elements of this collection and the operand collections and applies the specialised map function from type A and type B and type C to type D.

Attributes

Inherited methods

def fElemStr: A => String

String for element, can be overridden.

String for element, can be overridden.

Attributes

Inherited from:
SeqLike
def mutateElemUnsafe(index: Int, f: A => A): Unit

Mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLikeBacked
def setElemsUnsafe(index: Int, elems: A*): Unit

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLikeBacked
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
SeqLike -> Any
Inherited from:
SeqLike

Inherited and Abstract methods

def elem(index: Int): A

Accesses the specifying sequence element by a 0 based index. For Sequs this will an alternative name for apply.

Accesses the specifying sequence element by a 0 based index. For Sequs this will an alternative name for apply.

Attributes

Inherited from:
SeqLike
def numElems: Int

The number of data elements in the defining sequence. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array will be a multiple of this number. For Sequs this will be an alternative name for length.

The number of data elements in the defining sequence. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array will be a multiple of this number. For Sequs this will be an alternative name for length.

Attributes

Inherited from:
SeqLike
def setElemUnsafe(index: Int, newElem: A): Unit

Sets / mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates an element in the Arr at the given index. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLikeBacked

String specifying the type of this object.

String specifying the type of this object.

Attributes

Inherited from:
SeqLike