proc boolToInt* (value: bool): int = if value != true: return 0 else: return 1 proc intToBool* (value: int): bool = if value != 1: return false else: return true proc invertBool* (value: bool): bool = if value != true: return true else: return false