There are no builtin branch instructions in the Funky language.
Branch "instructions" are functions that are supplied some form of condition and two or more functions. Based upon the evaluation of the condition, one of the supplied functions is called.
The basic branch instructions of the standard library use polymorphic dispatch on the truth values std::true and std::false to implement std::if and std::if_not.
More complex branches like std::cond or std::case use std::if to check their conditions.
Loops |
std::case | a multiway conditional expression or statement |
std::cond | a multiway conditional expression or statement |
std::if | classic if; can be used as a function or a procedure |
std::if_not | can be used as a function or a procedure |
std::is_a_boolean | succeeds for |
std::on | if the specified condition is true then perform the specified action |
std::on_not | if the specified condition is false then perform the specified action |
std::update_if | updates one or more variables depending on a condition |
std::update_if_not | updates one or more variables depending on a condition |
std_types::false.std::is_a_boolean | obvious |
std_types::false.std::not | returns true |
std_types::false/std::and | returns |
std_types::false/std::if | evaluates the else-part and returns its result(s) |
std_types::false/std::if_not | evaluates the then-part and returns its result(s) |
std_types::false/std::on | does not perform the specified action |
std_types::false/std::on_not | performs the specified action |
std_types::false/std::or | evaluates its second argument and returns its result |
std_types::false/std::serialize | returns the string " |
std_types::false/std::update_if | does not update the specified variable(s) |
std_types::false/std::update_if_not | updates the specified variable(s) |
std_types::true.std::is_a_boolean | obvious |
std_types::true.std::not | returns false |
std_types::true/std::and | evaluates its second argument and returns its result |
std_types::true/std::if | evaluates the then-part and returns its result(s) |
std_types::true/std::if_not | evaluates the else-part and returns its result(s) |
std_types::true/std::on | performs the specified action |
std_types::true/std::on_not | does not perform the specified action |
std_types::true/std::or | returns |
std_types::true/std::serialize | returns the string " |
std_types::true/std::update_if | updates the specified variable(s) |
std_types::true/std::update_if_not | does not update the specified variable(s) |