Skip to content

Instantly share code, notes, and snippets.

Created November 5, 2010 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/663606 to your computer and use it in GitHub Desktop.
Save anonymous/663606 to your computer and use it in GitHub Desktop.
"([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment