Name

setcontains — Checks if a sorted list contains an element

Synopsis

boolean setcontains ( list LIST ,
  any ELEMENT );
 

Parameters

list LIST

List

any ELEMENT

Element

Return

boolean

True if element is in the list.

Description

Determines, if a certain value ELEMENT is contained in a list LIST, but assumes that LIST is sorted. If LIST is not sorted, the result is undefined.

Usage

  setcontains ([1, 2, 5], 2) -> true