urn-random-0.1.0.0: A package for updatable discrete distributions

Safe HaskellNone
LanguageHaskell2010

Data.Urn.Internal.AlmostPerfect

Synopsis

Documentation

almostPerfect :: (b -> b -> b) -> (a -> b) -> Word -> NonEmpty a -> b Source #

Create an "almost perfect" tree from a given list of a specified size. Invariants: specified size must match the actual length of the list, and list must be non-empty.

reverseBits# :: Word# -> Word# -> Word# Source #

Returns the number formed by snipping out the first n bits of the input and reversing them TODO: Make this more efficient