Bumperator

com.phasmidsoftware.number.core.misc.Bumperator
See theBumperator companion class
object Bumperator

The Bumperator companion object provides a factory method to create an instance of the Bumperator iterator. It applies a filtering function to consecutive elements of a sequence, ensuring only those satisfying the provided condition remain in the iteration pipeline.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Bumperator.type

Members list

Value members

Concrete methods

def apply[T](xs: Seq[T])(f: (T, T) => Boolean): Iterator[T]

Creates an iterator that filters elements from the given sequence based on a binary predicate function. The function determines whether consecutive elements in the sequence should be excluded.

Creates an iterator that filters elements from the given sequence based on a binary predicate function. The function determines whether consecutive elements in the sequence should be excluded.

Value parameters

f

a binary predicate function that takes two elements of type T and evaluates whether they should be excluded from the iteration

xs

the input sequence to be processed

Attributes

Returns

a Bumperator[T] containing elements of the sequence that have not been skipped.