find, find_equal
find, find_equal — search a list using the eq and equal functions.
Syntax
find (s_exp, list)
find_equal (s_exp, list)
Arguments
- s_exp
- Any Gamma or Lisp expression.
- list
- A list to be searched.
Returns
The tail of the list starting at the
matching element. If no match is found, nil.
Description
The find function searches the
list comparing each element to the
s_exp with the function
eq. The find_equal function
uses equal instead of eq for
the comparison.
Example
Gamma> find(#a,#list(d,x,c,a,f,t,l,j));(a f t l j)
Gamma> find("hi", #list("Bob","says", "hi"));
nil
Gamma> find_equal("hi",#list("Bob","says","hi"));
("hi")
Gamma>