Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- rollingHash :: ByteString -> RollingHash 2047
- rollingHashWith :: forall b. KnownNat b => ByteString -> RollingHash b
Documentation
rollingHash :: ByteString -> RollingHash 2047 Source #
rollingHash == rollingHashWith 2047
>>>
import qualified Data.ByteString.Char8 as C
>>>
rollingHash $ C.pack "abc"
406650978>>>
rollingHashWith @2047 $ C.pack "abc"
406650978
rollingHashWith :: forall b. KnownNat b => ByteString -> RollingHash b Source #
b
should be a primitive root of (2^61-1
)
>>>
import qualified Data.ByteString.Char8 as C
>>>
isPrimitiveRootRH 123
True>>>
rollingHashWith @123 $ C.pack "abc"
1479666