Skip to content

Conditional

Returns the results of one function or the other based on the result of a condition (boolean function).

Condition A Function that returns a boolean
If True A Function whose result is returned if the Condition evaluates to true. Must be the same type as If False
If False A Function whose result is returned if the Condition evaluates to false. Must be the same type as If True

Returns the contents of If True/If False.

Conditional: {
Condition: {
Connection Check: {
contents: ||md
www1.example.com:80
||
}
}
If True: {
"[2001:db8::cafe]"
}
If False: {
"[2001:db8::dead, 2001:db8::beef]"
}
Condition->If True: Returned if the connection check succeeds
Condition->If False: Returned if the connection check false
}