All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

search-for-item Generic Function

Summary

The generic function search-for-item returns the index of an item in a collection.

Package

capi

Signature

search-for-item collection item

Arguments
collection
item
A Lisp object.
Description

Returns the index of item in collection, using its collection-test-function to determine equality, and returns nil if no match is found.

The search is done by sequentially comparing item to each item in collection using the collection's test-function, which is cl:eq by default.

search-for-item is the counterpart function to get-collection-item which given an index, finds the appropriate item.

See also

get-collection-item
collection


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42