Is there a short contains function for lists?

Given a list xs and a value item, how can I check whether xs contains item (i.e., if any of the elements of xs is equal to item)? Is there something like xs.contains(item)?


For performance considerations, see Fastest way to check if a value exists in a list.

← Назад к списку