and
and(g_arg1g_arg2[g_arg3... ] ) => nil /g_val
Description
Evaluates from left to right its arguments to see if the result is nil. As soon as an argument evaluates to nil, and returns nil without evaluating the rest of the arguments. Otherwise, and evaluates the next argument. If all arguments except for the last evaluate to non-nil, and returns the value of the last argument as the result of the function call. Prefix form of the && binary operator.
Arguments
Value Returned
|
Value of the last argument if all the preceding arguments evaluate to non- |
Examples
and(nil t)
=> nil
and(t nil)
=> nil
and(18 12)
=> 12
Related Topics
Logical and Relational Functions
Return to top