API Reference › Builtin functions › is_none
function

is_none

is_none(o: option) -> bool

Returns true when an option is empty (it is none). The complement of is_some.

Parameters

othe option to test

Example

program AI {
  handler Step phase Update {
    let target = none()
    if is_none(target) { wander() }
  }
}
← All symbols