Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- binarySearch :: (Ord a, Integral n) => a -> (n -> a) -> n -> n -> n
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)