Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- nextMultipleOf :: (Integral m, Integral v) => m -> v -> v
- nextPowerOf :: (Ord p, Num p) => p -> p -> p
- toBinary :: a -> a -> Int -> [a]
- chunkedBy :: Int -> ByteString -> [ByteString]
- toStrictByteString :: Builder -> ByteString
- ceilDiv :: Integral i => i -> i -> i
Documentation
nextMultipleOf :: (Integral m, Integral v) => m -> v -> v Source #
The smallest multiple of multiplier
which is >= value
.
nextPowerOf :: (Ord p, Num p) => p -> p -> p Source #
Return the smallest integer which is a power of k and greater than or equal to n
toBinary :: a -> a -> Int -> [a] Source #
Construct a binary representation of the given integer. The first argument represents a zero bit. The second argument represents a one bit. The result is ordered from most to least significant bit.
:: Int | The number of bytes in each piece. |
-> ByteString | The byte string to break up. |
-> [ByteString] |
Break up a byte string into equal sized pieces, except the last piece which might be short. *BS.concat . chunkedBy n == id*