Skip to main content

Computation

Type Alias Computation 

Source
pub type Computation = fn(&[Option<i128>]) -> Option<i128>;
Expand description

A number worked out from the constants a pattern matched.

Handed one entry per binding, the same as a Guard is, and for the same reason: the computation is written in the names the pattern bound and those are positions by the time it runs. It gives nothing back when a binding it reads is not a constant, which is the answer a guard gives as false, and the rule does not fire.