ArrayOps Features:

Method Signature

ArrayOps
(JVM / Native)

js.ArrayOps
(js.Array)

narr.Extensions
(NArr)

def size: Int

def knownSize: Int

def isEmpty: Boolean

def nonEmpty: Boolean

def head: A

def last: A

def headOption: Option[A]

def lastOption: Option[A]

def sizeCompare(otherSize: Int): Int

def lengthCompare(len: Int): Int

def sizeIs: Int

def lengthIs: Int

def slice(from: Int, until: Int): Array[A]

def tail: Array[A]

def init: Array[A]

def tails: Iterator[Array[A]]

def inits: Iterator[Array[A]]

def take(n: Int): Array[A]

def drop(n: Int): Array[A]

def takeRight(n: Int): Array[A]

def dropRight(n: Int): Array[A]

def takeWhile(p: A => Boolean): Array[A]

def dropWhile(p: A => Boolean): Array[A]

def iterator: Iterator[A]

def stepper[S <: Stepper[_]](
  implicit shape: StepperShape[A, S]
): S with EfficientSplit

def grouped(size: Int): Iterator[Array[A]]

def span(p: A => Boolean): (Array[A], Array[A])

def splitAt(n: Int): (Array[A], Array[A])

def partition(p: A => Boolean): (Array[A], Array[A])

def partitionMap[A1: ClassTag, A2: ClassTag](
  f: A => Either[A1, A2]
): (Array[A1], Array[A2])

def reverse: Array[A]

def reverseIterator: Iterator[A]

def filter(p: A => Boolean): Array[A]

def filterNot(p: A => Boolean): Array[A]

def sorted[B >: A](implicit ord: Ordering[B]): Array[A]

def sortWith(lt: (A, A) => Boolean): Array[A]

def sortBy[B](f: A => B)(implicit ord: Ordering[B]): Array[A]

def withFilter(p: A => Boolean): ArrayOps.WithFilter[A]

def indexOf(elem: A, from: Int = 0): Int

def indexWhere(p: A => Boolean, from: Int = 0): Int

def lastIndexOf(elem: A, end: Int = xs.length - 1): Int

def lastIndexWhere(p: A => Boolean, end: Int = xs.length - 1): Int

def find(p: A => Boolean): Option[A]

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

def forall(p: A => Boolean): Boolean

def foldLeft[B](z: B)(op: (B, A) => B): B

def scanLeft[ B : ClassTag ](z: B)(op: (B, A) => B): Array[B]

def scan[B >: A : ClassTag](z: B)(op: (B, B) => B): Array[B]

def scanRight[ B : ClassTag ](z: B)(op: (A, B) => B): Array[B]

def foldRight[B](z: B)(op: (A, B) => B): B

def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1

def map[B](f: A => B)(implicit ct: ClassTag[B]): Array[B]

def mapInPlace(f: A => A): Array[A]

def flatMap[B : ClassTag](
  f: A => IterableOnce[B]
): Array[B]

def flatMap[BS, B](f: A => BS)(
  implicit asIterable: BS => Iterable[B], m: ClassTag[B]
): Array[B]

def flatten[B](
  implicit asIterable: A => IterableOnce[B], m: ClassTag[B]
): Array[B]

def collect[B: ClassTag](pf: PartialFunction[A, B]): Array[B]

def collectFirst[B](pf: PartialFunction[A, B]): Option[B]

def zip[B](that: IterableOnce[B]): Array[(A, B)]

def lazyZip[B](that: Iterable[B]): LazyZip2[A, B, Array[A]]

def zipAll[A1 >: A, B](
  that: Iterable[B], thisElem: A1, thatElem: B
): Array[(A1, B)]

def zipWithIndex: Array[(A, Int)]

def appended[B >: A : ClassTag](x: B): Array[B]

def :+ [B >: A : ClassTag](x: B): Array[B]

def prepended[B >: A : ClassTag](x: B): Array[B]

def +: [B >: A : ClassTag](x: B): Array[B]

def prependedAll[B >: A : ClassTag](prefix: IterableOnce[B]): Array[B]

def prependedAll[B >: A : ClassTag](prefix: Array[_ <: B]): Array[B]

def ++: [B >: A : ClassTag](prefix: IterableOnce[B]): Array[B]

def ++: [B >: A : ClassTag](prefix: Array[_ <: B]): Array[B]

def appendedAll[B >: A : ClassTag](suffix: IterableOnce[B]): Array[B]

def appendedAll[B >: A : ClassTag](suffix: Array[_ <: B]): Array[B]

def :++ [B >: A : ClassTag](suffix: IterableOnce[B]): Array[B]

def :++ [B >: A : ClassTag](suffix: Array[_ <: B]): Array[B]

def concat[B >: A : ClassTag](suffix: IterableOnce[B]): Array[B]

def concat[B >: A : ClassTag](suffix: Array[_ <: B]): Array[B]

def ++[B >: A : ClassTag](xs: IterableOnce[B]): Array[B]

def ++[B >: A : ClassTag](xs: Array[_ <: B]): Array[B]

def contains(elem: A): Boolean

def patch[B >: A : ClassTag](
  from: Int, other: IterableOnce[B], replaced: Int
): Array[B]

def unzip[A1, A2](
  implicit asPair: A => (A1, A2), ct1: ClassTag[A1], ct2: ClassTag[A2]
): (Array[A1], Array[A2])

def unzip3[A1, A2, A3](
  implicit asTriple: A => (A1, A2, A3),
  ct1: ClassTag[A1],
  ct2: ClassTag[A2],
  ct3: ClassTag[A3]
): (Array[A1], Array[A2], Array[A3])

def transpose[B](implicit asArray: A => Array[B]): Array[Array[B]]

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

def distinct: Array[A]

def distinctBy[B](f: A => B): Array[A]

def padTo[B >: A : ClassTag](len: Int, elem: B): Array[B]

def indices: Range

def groupBy[K](f: A => K): immutable.Map[K, Array[A]]

def groupMap[K, B : ClassTag](
  key: A => K
)(
  f: A => B): immutable.Map[K, Array[B]]

def toSeq: immutable.Seq[A]

def toIndexedSeq: immutable.IndexedSeq[A]

def copyToArray[B >: A](xs: Array[B]): Int

def copyToArray[B >: A](xs: Array[B], start: Int): Int

def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int

def toArray[B >: A: ClassTag]: Array[B]

def count(p: A => Boolean): Int

def startsWith[B >: A](that: Array[B]): Boolean

def startsWith[B >: A](that: Array[B], offset: Int): Boolean

def endsWith[B >: A](that: Array[B]): Boolean

def updated[B >: A : ClassTag](index: Int, elem: B): Array[B]

def view: IndexedSeqView[A]

def diff[B >: A](that: Seq[B]): Array[A]

def intersect[B >: A](that: Seq[B]): Array[A]

def sliding(size: Int, step: Int = 1): Iterator[Array[A]]

def combinations(n: Int): Iterator[Array[A]]

def permutations: Iterator[Array[A]]

def startsWith[B >: A](that: IterableOnce[B], offset: Int = 0): Boolean

def endsWith[B >: A](that: Iterable[B]): Boolean