incremental 0.2.8

incremental computations, based on Jane Street's incremental
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[repr(transparent)]
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct StabilisationNum(pub i32);

impl StabilisationNum {
    pub fn init() -> Self {
        Self(-1)
    }
    pub fn add1(self) -> Self {
        Self(self.0 + 1)
    }
    pub fn is_never(&self) -> bool {
        self.0 == -1
    }
}