tailp
tailp(l_arg1l_arg2) =>l_arg1/nil
Description
Returns arg1 if a list cell eq to arg1 is found by cdr down arg2 zero or more times. It returns nil otherwise. Because eq is being used for comparison l_arg1 must point to a tail list in l_arg2 for this predicate to return a non-nil value.
The suffix p is usually added to the name of a function to indicate that it is a predicate function.
Arguments
Value Returned
|
If a list cell |
|
|
If a list cell |
Examples
y = '(b c)
z = cons( 'a y )
=> (a b c)
tailp( y z )
=> (b c)
tailp( '(b c) z )
=> nil
nil was returned because '(b c) is not eq the cdr( z ).
Related Topics
Return to top