Skip to content

Instantly share code, notes, and snippets.

@nahive
Created April 21, 2017 02:21
Show Gist options
  • Save nahive/986d6cc9eb0664015b72dcf892b15210 to your computer and use it in GitHub Desktop.
Save nahive/986d6cc9eb0664015b72dcf892b15210 to your computer and use it in GitHub Desktop.
/// Returns a Boolean value indicating whether the given element is contained
/// within the range.
///
/// A `ClosedRange` instance contains both its lower and upper bound.
/// `element` is contained in the range if it is between the two bounds or
/// equal to either bound.
///
/// - Parameter element: The element to check for containment.
/// - Returns: `true` if `element` is contained in the range; otherwise,
/// `false`.
public func contains(_ element: Bound) -> Bool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment