Skip to main content

CODE_CRDT_TALLY

Constant CODE_CRDT_TALLY 

Source
pub const CODE_CRDT_TALLY: &str = r#"# Tally (Bidirectional Counter)
-- Guide Section 13: PN-Counter that can increase and decrease

## Definition
A Score is Shared and has:
    points: Tally.

## Main
Let mutable s be a new Score.
Increase s's points by 100.
Show "After +100: " + s's points.

Decrease s's points by 30.
Show "After -30: " + s's points.

Increase s's points by 10.
Show "Final: " + s's points.
"#;