Skip to main content
Conditional composition selects a branch based on a condition.
PC gate {
    fn gate(value) {
        if (value <= 0) {
            return 0;
        }

        return 1;
    }
}

Review Points

  • Blocked cases are explicit.
  • Every branch returns.
  • Branches return compatible result kinds.
  • The final allowed path is visible.

Review Guidance

Every branch must produce a defined result.