function
is_some
is_some(o: option) -> bool
Returns true when an option holds a value (it is some, not none) — the guard before acting on an optional target or slot.
Parameters
othe option to testExample
program AI {
handler Step phase Update {
let target = none()
if is_some(target) { chase(unwrap_or(target, 0)) }
}
}