blob: 755ab1eb9fa8457a0ff1b57880c21acad50c43f5 [file] [log] [blame] [view] [edit]
Branching with if-else is similar to C. Unlike C, the boolean condition doesn't
need to be surrounded by parentheses, and each condition is followed by a
block. If-else conditionals are expressions too; and, because of Rust type
safety, all the branches must return the same type.
{if-else.play}