Skip to content

ALL-CONT0001 · examples

These examples come directly from ALL-CONT0001. Read their source.

if not values:
return 0
else:
return sum(values)
if not values:
return 0
return sum(values)
The same shape in Rust is `if values.is_empty() { return 0; } else { ... }`, and the same
repair drops the `else` and dedents everything it held.