Guard Statement

A conditional statement in Haskell or Clean whose right-hand side will only be evaluated if the guard statement evaluates to true. A list of guard statements are normally evaluated in a top to bottom order.
  f x    | x > 0     = 1    | otherwise = 0 
The guard statements occur after each "|" and before the "=". Similar to the mathematic notation: f(x) = \left\{ \begin{matrix}
                1   & \mbox{if } x>0 \\                 0   & \mbox{otherwise}                 \end{matrix}         \right. 
In this case the guard conditions are the "if" and "otherwise" statements.

 

<< PreviousWord BrowserNext >>
students for global democracy
islam in indonesia
voice browser
sacramento city college
the coast
harmonic rhythm
joe gibbs (jamaica)
32nd canadian parliament
robert bouchard
james rebhorn
peter skene ogden
39th canadian parliament
hansa bryggeri
nicole lyn
christopher orr
battlemasters
tite kubo
vfa 14 tophatters
bad segeberg
harbour line
stan smyl
abraham ecker
washim
islam in philippines
bo peng
dale duesing
estimates
kraft process
cable access
reporter gene assay
philo of larissa
philo of byzantium
islam in uzbekistan
steve zahn
fara phoenix
yaowapa boorapolchai
perc, quebec
australia parliamentary friendship group
xinhua
islam in turkmenistan
christopher caudwell
philippe de noailles, duc de mouchy
islam in uganda
sandra bowden