The OpenD Programming Language

assumeSortedContains

  1. bool assumeSortedContains(Slice!(Iterator, 1, kind) slice, V v)
    template assumeSortedContains(alias test = "a < b")
    static if(__traits(isSame, naryFun!test, test))
    bool
    assumeSortedContains
    (
    Iterator
    SliceKind kind
    V
    )
    (
    auto ref Slice!(Iterator, 1, kind) slice
    ,
    auto ref scope const V v
    )
  2. bool assumeSortedContains(T[] ar, V v)

Members

Functions

assumeSortedContains
bool assumeSortedContains(Slice!(Iterator, 1, kind) slice, V v)
bool assumeSortedContains(T[] ar, V v)

Parameters

test

strict ordering symmetric predicate

For non-symmetric predicates please use a structure with two opCalls or an alias of two global functions, that correponds to (array[i], value) and (value, array[i]) cases.

Return Value

true if a sorted array contains the value.

See Also

Meta