Skip to content
Snippets Groups Projects
  • Etienne Kneuss's avatar
    ad33512e
    New list operations · ad33512e
    Etienne Kneuss authored
    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]
    ad33512e
    History
    New list operations
    Etienne Kneuss authored
    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]