invariant function

void invariant(
  1. bool cond,
  2. List<String> str
)

Implementation

void invariant(bool cond, List<String> str) {
  if (!cond) {
    throw (str.join(' '));
  }
}