#lang scribble/manual @title{if} If statements in Pyret look very similar to if statements in Python. @verbatim|{ fun sgn(x): if x < 0: -1 elif x = 0: 0 else: 1 }| If statements can only have one expression after the colon. Nested if statements require a newline, and follow the SLGC indent rule. Else statements are not required, but when not using one, the @tt[]{:done} keyword is required to let Pyret know that you have finished the if statement. @verbatim|{ fun sgn(x): if x < 0: -1 elif x = 0: 0 elif x > 0: 1 :done }| Pyret will signal an error if you fall through the if statement.