contains

func contains<S : SequenceType where S.Generator.Element : Equatable>(_: S, x: S.Generator.Element)

Return true iff x is in seq.

Declaration

func contains<S : SequenceType where S.Generator.Element : Equatable>(seq: S, x: S.Generator.Element) -> Bool
func contains<S : SequenceType, L : BooleanType>(_: S, predicate: @noescape (S.Generator.Element) -> L)

Return true iff an element in seq satisfies predicate.

Declaration

func contains<S : SequenceType, L : BooleanType>(seq: S, predicate: @noescape (S.Generator.Element) -> L) -> Bool