ShExChecker
Type members
Types
Value members
Concrete methods
Checks all elements in a list If any of the elements fails, it fails
Checks all elements in a list If any of the elements fails, it fails
Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)
Given a list of checks, return the list of values that pass It never fails (in case of failure, it ignores the value)
Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last
Given a computation check that returns a pair of value and a flag, returns the first value whose flag is true If none is true, returns the value of the computation parameter last
Checks some values. Returns the first that passes or None
Checks some values. Returns the first that passes or None
Attempts to execute a check
If it fails, applies thenPart
to the result, otherwise applies elsePart
to the error
Attempts to execute a check
If it fails, applies thenPart
to the result, otherwise applies elsePart
to the error
- Type parameters:
- A
type returned by the computation
- B
type returned the the condition
- Value parameters:
- check
Computation to check
- elsePart
part to be executed when the check fails
- thenPart
part to be executed when it passes
Returns the list of values whose computation is successful
Returns the list of values whose computation is successful
- Type parameters:
- A
type of values
- B
type returned by computation
- Value parameters:
- check
computation to check for each value
- ls
list of values
- Returns:
a computation with a list of pairs for whom the computation was successful
If c
is some value, applies check
, otherwise applies default
If c
is some value, applies check
, otherwise applies default
- Value parameters:
- c
Optional value
- check
check function
- default
value in case there is no option
Run a computation in a local environment. If the computation fails, return the result of calling safe
function over the current environment
Run a computation in a local environment. If the computation fails, return the result of calling safe
function over the current environment
- Value parameters:
- c
computation to run
- f
environment
- safe
function to call if the computation fails