Skip to content
Snippets Groups Projects
Commit ad33512e authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

New list operations

List:
  slice(from: Int, to: Int): List[T]
  replace(from: T, to: T): List[T]
  chunks(s: Int): List[List[T]]
  zip[B](that: List[B]): List[(T, B)]
  -(e: T): List[T]
  --(that: List[T]): List[T]
  &(that: List[T]): List[T]
  pad(s: Int, e: T): List[T]
  find(e: T): Option[Int]
  lastOption: Option[T]
  firstOption: Option[T]
  unique: List[T]
  splitAt(e: T): List[List[T]]
  split(seps: List[T]): List[List[T]]
  count(e: T): Int
  evenSplit: (List[T], List[T])
  insertAt(pos: Int, l: List[T]): List[T]
  replaceAt(pos: Int, l: List[T]): List[T]
  rotate(s: Int): List[T]

ListOps:
  flatten[T](ls: List[List[T]]): List[T]
parent 895a1962
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment