Loop

trait Loop[S]

Provides abstractions for a loop that can be executed, keeping a state on every iteration.

Type parameters:
S

State

class Object
trait Matchable
class Any
Loop[S]

Value members

Abstract methods

def run(initialState: S): Unit

Runs this loop.

Runs this loop.

Value parameters:
initalState

initial loop state

Concrete methods

final def run()(implicit ev: Unit =:= S): Unit

Runs this loop

Runs this loop

final def withInitialState(state: S): Loop[Unit]

Converts this loop to a stateless loop, with a predefined initial state.

Converts this loop to a stateless loop, with a predefined initial state.

Value parameters:
initalState

initial loop state