boolToInt function

int boolToInt(
  1. bool a
)

Convert a bool to int, if true return 1, else 0

Implementation

int boolToInt(bool a) => a ? 1 : 0;