hw-prim-0.6.3.1: Primitive functions and data types
Safe HaskellSafe-Inferred
LanguageHaskell2010

HaskellWorks.Data.Search

Synopsis

Documentation

binarySearch :: (Ord a, Integral n) => a -> (n -> a) -> n -> n -> n Source #

Perform a binary search in the domain of function f, bounded by the values p and q to find the least value v such that: @w <= (f v)