Packages

t

cats

FoldableNFunctions

trait FoldableNFunctions[F[_]] extends AnyRef

Self Type
Foldable[F]
Source
FoldableNFunctions.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. FoldableNFunctions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. def sliding10[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A)]

  16. def sliding11[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A)]

  17. def sliding12[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A)]

  18. def sliding13[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A)]

  19. def sliding14[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A)]

  20. def sliding15[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]

  21. def sliding16[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]

  22. def sliding17[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A)]

  23. 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)]

  24. 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)]

  25. def sliding2[A](fa: F[A]): List[(A, A)]

  26. 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)]

  27. 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)]

  28. 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)]

  29. def sliding3[A](fa: F[A]): List[(A, A, A)]

  30. def sliding4[A](fa: F[A]): List[(A, A, A, A)]

  31. def sliding5[A](fa: F[A]): List[(A, A, A, A, A)]

  32. def sliding6[A](fa: F[A]): List[(A, A, A, A, A, A)]

  33. def sliding7[A](fa: F[A]): List[(A, A, A, A, A, A, A)]

  34. def sliding8[A](fa: F[A]): List[(A, A, A, A, A, A, A, A)]

  35. def sliding9[A](fa: F[A]): List[(A, A, A, A, A, A, A, A, A)]

  36. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

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()