Proposed additions to Data.Map: lookupFloor and lookupCeiling
leather at cs.uu.nl
Mon Mar 1 02:39:04 EST 2010
> -- | /O(log n)/. Find the greatest key that is smaller or equal
> -- to the given target key. This \"floor\" key is returned,
> -- | /O(log n)/. Find the smallest key that is greater or equal
> -- to the given target key. This \"ceiling\" key is returned,
It seems more intuitive to reverse the naming. The key parameter to
lookupFloor is actually the ceiling, and the key returned is the greatest
key less than or equal to the ceiling. Since there is no floor involved
here, I would call the function lookupCeiling.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries