Packages

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
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IList
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean
    Definition Classes
    Equals
  2. abstract def productArity: Int
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any
    Definition Classes
    Product

Concrete Value Members

  1. def ++(as: IList[A]): IList[A]

    alias for concat

  2. def ++:(as: IList[A]): IList[A]

    alias for prepend

  3. def +:(a: A): IList[A]
  4. def /:[B](b: B)(f: (B, A) => B): B

    alias for foldLeft

  5. def :+(a: A): IList[A]
  6. def ::(a: A): IList[A]
  7. def :::(as: IList[A]): IList[A]
  8. def :\[B](b: B)(f: (A, B) => B): B

    alias for foldRight

  9. final def <^>[B](f: (OneAnd[IList, A]) => B)(implicit B: Monoid[B]): B

    Returns f applied to contents if non-empty, otherwise the zero of B.

  10. def collect[B](pf: PartialFunction[A, B]): IList[B]
  11. def collectFirst[B](pf: PartialFunction[A, B]): Maybe[B]
  12. def concat(as: IList[A]): IList[A]
  13. def containsSlice(as: IList[A])(implicit ev: Equal[A]): Boolean
  14. def count(f: (A) => Boolean): Int
  15. def distinct(implicit A: Order[A]): IList[A]
  16. def drop(n: Int): IList[A]
  17. def dropRight(n: Int): IList[A]
  18. def dropRightWhile(f: (A) => Boolean): IList[A]
  19. def dropWhile(f: (A) => Boolean): IList[A]
  20. def endsWith(as: IList[A])(implicit ev: Equal[A]): Boolean
  21. def filter(f: (A) => Boolean): IList[A]
  22. def filterM[F[_]](f: (A) => F[Boolean])(implicit F: Applicative[F]): F[IList[A]]
  23. def filterNot(f: (A) => Boolean): IList[A]
  24. def find(f: (A) => Boolean): Maybe[A]
  25. def flatMap[B](f: (A) => IList[B]): IList[B]
  26. def flatten[B](implicit ev: <~<[A, IList[B]]): IList[B]
  27. def foldLeft[B](b: B)(f: (B, A) => B): B
  28. def foldRight[B](b: B)(f: (A, B) => B): B
  29. def groupBy[K](f: (A) => K)(implicit ev: Order[K]): ==>>[K, NonEmptyList[A]]
  30. def groupBy1[K](f: (A) => K)(implicit ev: Order[K]): ==>>[K, OneAnd[IList, A]]
  31. def headMaybe: Maybe[A]
  32. def headOption: Option[A]
  33. def indexOf(a: A)(implicit ev: Equal[A]): Option[Int]
  34. def indexOfSlice(slice: IList[A])(implicit ev: Equal[A]): Option[Int]
  35. def indexWhere(f: (A) => Boolean): Option[Int]
  36. def initMaybe: Maybe[IList[A]]
  37. def inits: IList[IList[A]]
  38. def interleave(that: IList[A]): IList[A]
  39. def intersperse(a: A): IList[A]
  40. def isEmpty: Boolean
  41. def lastIndexOf(a: A)(implicit ev: Equal[A]): Option[Int]
  42. def lastIndexOfSlice(as: IList[A])(implicit ev: Equal[A]): Option[Int]
  43. def lastIndexWhere(f: (A) => Boolean): Option[Int]
  44. final def lastOption: Option[A]
    Annotations
    @tailrec()
  45. def length: Int
  46. def map[B](f: (A) => B): IList[B]
  47. def mapAccumLeft[B, C](c: C)(f: (C, A) => (C, B)): (C, IList[B])

    All of the Bs, in order, and the final C acquired by a stateful left fold over as.

  48. final def mapAccumRight[B, C](c: C)(f: (C, A) => (C, B)): (C, IList[B])

    All of the Bs, in order as-wise, and the final C acquired by a stateful right fold over as.

  49. def nonEmpty: Boolean
  50. def padTo(n: Int, a: A): IList[A]
  51. def partition(f: (A) => Boolean): (IList[A], IList[A])
  52. def patch(from: Int, patch: IList[A], replaced: Int): IList[A]
  53. def prefixLength(f: (A) => Boolean): Int
  54. def prepend(as: IList[A]): IList[A]
  55. def productElementName(n: Int): String
    Definition Classes
    Product
  56. def productElementNames: Iterator[String]
    Definition Classes
    Product
  57. def productIterator: Iterator[Any]
    Definition Classes
    Product
  58. def productPrefix: String
    Definition Classes
    Product
  59. def reduceLeftOption(f: (A, A) => A): Option[A]
  60. def reduceRightOption(f: (A, A) => A): Option[A]
  61. def reverse: IList[A]
  62. def reverseMap[B](f: (A) => B): IList[B]
  63. def reverse_:::(as: IList[A]): IList[A]
  64. def scanLeft[B](z: B)(f: (B, A) => B): IList[B]
  65. def scanRight[B](z: B)(f: (A, B) => B): IList[B]
  66. def slice(from: Int, until: Int): IList[A]
  67. def sortBy[B](f: (A) => B)(implicit B: Order[B]): IList[A]
  68. def sorted(implicit ev: Order[A]): IList[A]
  69. def span(f: (A) => Boolean): (IList[A], IList[A])
  70. def splitAt(n: Int): (IList[A], IList[A])
  71. def startsWith(as: IList[A])(implicit ev: Equal[A]): Boolean
  72. def tailMaybe: Maybe[IList[A]]
  73. def tails: IList[IList[A]]
  74. def take(n: Int): IList[A]
  75. def takeRight(n: Int): IList[A]
  76. def takeRightWhile(f: (A) => Boolean): IList[A]
  77. def takeWhile(f: (A) => Boolean): IList[A]
  78. def toEphemeralStream: EphemeralStream[A]
  79. def toLazyList: LazyList[A]
  80. def toList: List[A]
  81. def toMap[K, V](implicit ev0: <~<[A, (K, V)], ev1: Order[K]): ==>>[K, V]
  82. def toNel: Maybe[NonEmptyList[A]]
  83. def toStream: Stream[A]
  84. def toString(): String
    Definition Classes
    IList → AnyRef → Any
  85. def toVector: Vector[A]
  86. def toZipper: Maybe[Zipper[A]]
  87. def traverseDisjunction[E, B](f: (A) => \/[E, B]): \/[E, IList[B]]

    Referentially transparent replacement for traverse, specialised to disjunction.

  88. def uncons[B](n: => B, c: (A, IList[A]) => B): B
  89. def unzip[B, C](implicit ev: <~<[A, (B, C)]): (IList[B], IList[C])
  90. def updated(index: Int, a: A): IList[A]

    Unlike stdlib's version, this is total and simply ignores indices that are out of range

  91. def widen[B](implicit ev: <~<[A, B]): IList[B]
  92. def zip[B](b: => IList[B]): IList[(A, B)]
  93. def zipWithIndex: IList[(A, Int)]