sealed abstract class IList[A] extends Product with Serializable
Safe, invariant alternative to stdlib List
. Most methods on List
have a sensible equivalent
here, either on the IList
interface itself or via typeclass instances (which are the same as
those defined for stdlib List
). All methods are total and stack-safe.
- Source
- IList.scala
- Alphabetic
- By Inheritance
- IList
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++(as: IList[A]): IList[A]
alias for
concat
- def ++:(as: IList[A]): IList[A]
alias for
prepend
- def +:(a: A): IList[A]
- def /:[B](b: B)(f: (B, A) => B): B
alias for
foldLeft
- def :+(a: A): IList[A]
- def ::(a: A): IList[A]
- def :::(as: IList[A]): IList[A]
- def :\[B](b: B)(f: (A, B) => B): B
alias for
foldRight
- final def <^>[B](f: (OneAnd[IList, A]) => B)(implicit B: Monoid[B]): B
Returns
f
applied to contents if non-empty, otherwise the zero ofB
. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[B](pf: PartialFunction[A, B]): IList[B]
- def collectFirst[B](pf: PartialFunction[A, B]): Maybe[B]
- def concat(as: IList[A]): IList[A]
- def containsSlice(as: IList[A])(implicit ev: Equal[A]): Boolean
- def count(f: (A) => Boolean): Int
- def distinct(implicit A: Order[A]): IList[A]
- def drop(n: Int): IList[A]
- def dropRight(n: Int): IList[A]
- def dropRightWhile(f: (A) => Boolean): IList[A]
- def dropWhile(f: (A) => Boolean): IList[A]
- def endsWith(as: IList[A])(implicit ev: Equal[A]): Boolean
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def filter(f: (A) => Boolean): IList[A]
- def filterM[F[_]](f: (A) => F[Boolean])(implicit F: Applicative[F]): F[IList[A]]
- def filterNot(f: (A) => Boolean): IList[A]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(f: (A) => Boolean): Maybe[A]
- def flatMap[B](f: (A) => IList[B]): IList[B]
- def flatten[B](implicit ev: <~<[A, IList[B]]): IList[B]
- def foldLeft[B](b: B)(f: (B, A) => B): B
- def foldRight[B](b: B)(f: (A, B) => B): B
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def groupBy[K](f: (A) => K)(implicit ev: Order[K]): ==>>[K, NonEmptyList[A]]
- def groupBy1[K](f: (A) => K)(implicit ev: Order[K]): ==>>[K, OneAnd[IList, A]]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def headMaybe: Maybe[A]
- def headOption: Option[A]
- def indexOf(a: A)(implicit ev: Equal[A]): Option[Int]
- def indexOfSlice(slice: IList[A])(implicit ev: Equal[A]): Option[Int]
- def indexWhere(f: (A) => Boolean): Option[Int]
- def initMaybe: Maybe[IList[A]]
- def inits: IList[IList[A]]
- def interleave(that: IList[A]): IList[A]
- def intersperse(a: A): IList[A]
- def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lastIndexOf(a: A)(implicit ev: Equal[A]): Option[Int]
- def lastIndexOfSlice(as: IList[A])(implicit ev: Equal[A]): Option[Int]
- def lastIndexWhere(f: (A) => Boolean): Option[Int]
- final def lastOption: Option[A]
- Annotations
- @tailrec()
- def length: Int
- def map[B](f: (A) => B): IList[B]
- def mapAccumLeft[B, C](c: C)(f: (C, A) => (C, B)): (C, IList[B])
All of the
B
s, in order, and the finalC
acquired by a stateful left fold overas
. - final def mapAccumRight[B, C](c: C)(f: (C, A) => (C, B)): (C, IList[B])
All of the
B
s, in orderas
-wise, and the finalC
acquired by a stateful right fold overas
. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def padTo(n: Int, a: A): IList[A]
- def partition(f: (A) => Boolean): (IList[A], IList[A])
- def patch(from: Int, patch: IList[A], replaced: Int): IList[A]
- def prefixLength(f: (A) => Boolean): Int
- def prepend(as: IList[A]): IList[A]
- def productElementName(n: Int): String
- Definition Classes
- Product
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def productIterator: Iterator[Any]
- Definition Classes
- Product
- def productPrefix: String
- Definition Classes
- Product
- def reduceLeftOption(f: (A, A) => A): Option[A]
- def reduceRightOption(f: (A, A) => A): Option[A]
- def reverse: IList[A]
- def reverseMap[B](f: (A) => B): IList[B]
- def reverse_:::(as: IList[A]): IList[A]
- def scanLeft[B](z: B)(f: (B, A) => B): IList[B]
- def scanRight[B](z: B)(f: (A, B) => B): IList[B]
- def slice(from: Int, until: Int): IList[A]
- def sortBy[B](f: (A) => B)(implicit B: Order[B]): IList[A]
- def sorted(implicit ev: Order[A]): IList[A]
- def span(f: (A) => Boolean): (IList[A], IList[A])
- def splitAt(n: Int): (IList[A], IList[A])
- def startsWith(as: IList[A])(implicit ev: Equal[A]): Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tailMaybe: Maybe[IList[A]]
- def tails: IList[IList[A]]
- def take(n: Int): IList[A]
- def takeRight(n: Int): IList[A]
- def takeRightWhile(f: (A) => Boolean): IList[A]
- def takeWhile(f: (A) => Boolean): IList[A]
- def toEphemeralStream: EphemeralStream[A]
- def toLazyList: LazyList[A]
- def toList: List[A]
- def toMap[K, V](implicit ev0: <~<[A, (K, V)], ev1: Order[K]): ==>>[K, V]
- def toNel: Maybe[NonEmptyList[A]]
- def toStream: Stream[A]
- def toString(): String
- Definition Classes
- IList → AnyRef → Any
- def toVector: Vector[A]
- def toZipper: Maybe[Zipper[A]]
- def traverseDisjunction[E, B](f: (A) => \/[E, B]): \/[E, IList[B]]
Referentially transparent replacement for traverse, specialised to disjunction.
- def uncons[B](n: => B, c: (A, IList[A]) => B): B
- def unzip[B, C](implicit ev: <~<[A, (B, C)]): (IList[B], IList[C])
- def updated(index: Int, a: A): IList[A]
Unlike stdlib's version, this is total and simply ignores indices that are out of range
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def widen[B](implicit ev: <~<[A, B]): IList[B]
- def zip[B](b: => IList[B]): IList[(A, B)]
- def zipWithIndex: IList[(A, Int)]