object Shrink extends XCompat
- Alphabetic
- By Inheritance
- Shrink
- XCompat
- 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
- val StreamOrLazyList: LazyList.type
- Definition Classes
- XCompat
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def consNub[A](x: A, ys0: List[A]): List[A]
Cons an element on to the front of a list unless it is already there.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def halves[A](a: A)(implicit I: Integral[A]): List[A]
Produce a list containing the progressive halving of an integral.
Produce a list containing the progressive halving of an integral.
scala> halves(15) List(15, 7, 3, 1) scala> halves(100) List(100, 50, 25, 12, 6, 3, 1) scala> halves(-26) List(-26, -13, -6, -3, -1)
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def list[A](xs: List[A]): List[List[A]]
Shrink a list by edging towards the empty list.
Shrink a list by edging towards the empty list.
scala> list(List(1, 2, 3)) List(List(), List(2, 3), List(1, 3), List(1, 2)) >>> list("abcd".toList) List("", "cd", "ab", "bcd", "acd", "abd", "abc")
Note we always try the empty list first, as that is the optimal shrink.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def removes[A](k0: Int, xs0: List[A]): List[List[A]]
Produce all permutations of removing 'k' elements from a list.
Produce all permutations of removing 'k' elements from a list.
scala> removes(2, "abcdef".toList) List("cdef", "abef", "abcd")
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def towards[A](destination: A, x: A)(implicit I: Integral[A]): List[A]
Shrink an integral number by edging towards a destination.
Shrink an integral number by edging towards a destination.
scala> towards(0, 100) List(0, 50, 75, 88, 94, 97, 99) scala> towards(500, 1000) List(500, 750, 875, 938, 969, 985, 993, 997, 999) scala> towards(-50, -26) List(-50, -38, -32, -29, -27)
Note we always try the destination first, as that is the optimal shrink.
- def towardsFloat[A](destination: Double, x: Double): List[Double]
Shrink a floating-point number by edging towards a destination.
Shrink a floating-point number by edging towards a destination.
scala> towards(0.0, 100) List(0.0, 50.0, 75.0, 87.5, 93.75, 96.875, 98.4375...) scala> towards(1.0, 0.5) List(1.0, 0.75, 0.625, 0.5625, 0.53125, 0.515625, 0.5078125...)
Note we always try the destination first, as that is the optimal shrink.
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)