trait FoldableNFunctions[F[_]] extends AnyRef
- Grouped
- Alphabetic
- By Inheritance
- FoldableNFunctions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- 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()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sliding10[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A)]
- def sliding11[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A)]
- def sliding12[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding13[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding14[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding15[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding16[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding17[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding18[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding19[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding2[A](fa: F[A]): List[(A, A)]
- def sliding20[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding21[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding22[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]
- def sliding3[A](fa: F[A]): List[(A, A, A)]
- def sliding4[A](fa: F[A]): List[(A, A, A, A)]
- def sliding5[A](fa: F[A]): List[(A, A, A, A, A)]
- def sliding6[A](fa: F[A]): List[(A, A, A, A, A, A)]
- def sliding7[A](fa: F[A]): List[(A, A, A, A, A, A, A)]
- def sliding8[A](fa: F[A]): List[(A, A, A, A, A, A, A, A)]
- def sliding9[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A)]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
Ungrouped
foldable arity
Group sequential elements into fixed sized tuples by passing a "sliding window" over them.
A foldable with fewer elements than the window size will return an empty list unlike Iterable#sliding(size: Int)
.
Example:
import cats.Foldable scala> Foldable[List].sliding2((1 to 10).toList) val res0: List[(Int, Int)] = List((1,2), (2,3), (3,4), (4,5), (5,6), (6,7), (7,8), (8,9), (9,10)) scala> Foldable[List].sliding4((1 to 10).toList) val res1: List[(Int, Int, Int, Int)] = List((1,2,3,4), (2,3,4,5), (3,4,5,6), (4,5,6,7), (5,6,7,8), (6,7,8,9), (7,8,9,10)) scala> Foldable[List].sliding4((1 to 2).toList) val res2: List[(Int, Int, Int, Int)] = List()