OutOfBounds
eff OutOfBoundsSourceIndicates that an index was out of bounds.
Useful for instances of Index or IndexMut.
Operations
def outOfBounds(msg: String): Void \ OutOfBounds
SourceStops execution with an error message.
Definitions
@Experimental def handleWithResult(f: a -> b \ ef): a -> Result[String, b] \ ef - OutOfBounds
SourceHandles the OutOfBounds effect of the given function f by converting
out-of-bounds errors to Result values.
Returns Ok(f(x)) if the computation completes successfully.
Returns Err(msg) if the computation raises outOfBounds(msg).
@Experimental def runWithResult(f: Unit -> a \ ef): Result[String, a] \ ef - OutOfBounds
SourceRuns the OutOfBounds effect of the given function f.
Returns Ok(f()) if the computation completes successfully.
Returns Err(msg) if the computation raises outOfBounds(msg).