cond Function

Provides a way to conditionally select the value of one of two expressions.
It is similar to the ternary conditional operator (a?b:c) in C and Java.

Example

The cond function allows three arguments. The first
argument is called the condition. If the value
of the condition is logically true, the value of the cond will
be the value of the second argument. If the value of the condition is false,
the value of the cond will be the value of the
third argument. If the value of the condition is false, and the third argument
not present, the value of the cond is null.