Guards vs. if

Consider the simple Haskell function:
f:: Int -> [Char]
f x
    | x < 0          = "negative"
    | x == 0         = "zero"
    | otherwise      = "positive"

A corresponding C program might contain these statements:

    if (x < 0) {
    	printf("negative\n");
    } else if (x == 0) {
    	printf("zero\n");
    } else {
    	printf("positive\n");
    }

Index