If|if_then_else_

Definitions:

true's type, nullary procedure, nullary procedure
Source: /avail/Avail/Foundation/Early Conditionals
Categories: Conditionals
Define the two-branch conditional evaluation method for a true condition.
Position Name Type Description
Parameters
1 predicate true's type The boolean value, which is true for this method definition.
2 trueFunction nullary procedure What to invoke if the predicate is true, which it is.
3 falseFunction nullary procedure What to invoke if the predicate is false, which it is not.
Returns
boolean, nullary procedure, nullary procedure
Source: /avail/Avail/Foundation/Early Conditionals
Categories: Conditionals
Declare the default two-branch conditional evaluation method. This one runs the false function, so there must be an override for the true case. Note that the semantic restrictions are defined in a downstream module, so until that point, the conditional method will be top-valued and can only be used as a statement.
Position Name Type Description
Parameters
1 predicate boolean The boolean value, which is false for this method definition, assuming the true case is handled in an override.
2 trueFunction nullary procedure What to invoke if the predicate is true, which it isn't.
3 falseFunction nullary procedure What to invoke if the predicate is false, which it is.
Returns

Semantic restrictions:

boolean's type, nullary procedure's type, nullary procedure's type
Source: /avail/Avail/Foundation/Early Control Structures
Establish a conditional expression whose static return type is the type union of its two possible functions' return types.
Type Description
Parameter Types
boolean's type
nullary procedure's type
nullary procedure's type
false's type's type, nullary procedure's type, nullary procedure's type
Source: /avail/Avail/Foundation/Early Control Structures
Strengthen the static return type to that of the function to invoke when the predicate is false (which it is).
Type Description
Parameter Types
false's type's type
nullary procedure's type
nullary procedure's type
true's type's type, nullary procedure's type, nullary procedure's type
Source: /avail/Avail/Foundation/Early Control Structures
Strengthen the static return type to that of the function to invoke when the predicate is true (which it is).
Type Description
Parameter Types
true's type's type
nullary procedure's type
nullary procedure's type