hw-prim-0.6.2.20: Primitive functions and data types

Safe HaskellSafe
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)