Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
purescript-bridge Language.PureScript.Bridge.PSTypes No documentation available.
-
real-dice RealDice.Convert.BinaryString Converts a binary character to a Bool
Examples
>>> binToBool '0' False >>> binToBool '1' True >>> binToBool '2' *** Exception: Invalid binary character: '2' (valid binary characters are '0' and '1')
binToBools :: String -> [Bool]real-dice RealDice.Convert.BinaryString Converts a binary string to a list of Bools
Examples
>>> binToBools "1011" [True,False,True,True] >>> binToBools "1012" *** Exception: Invalid binary character: '2' (valid binary characters are '0' and '1')
stringToBools :: String -> [Bool]real-dice RealDice.Convert.BinaryString Converts a string containing '0's and '1's to a list of Bools, ignoring any characters that are not '0' or '1'
Examples
>>> stringToBools "1011" [True,False,True,True] >>> stringToBools "1012" [True,False,True] >>> stringToBools "Hello, Haskell!" [] >>> stringToBools "On the 10th of March, 1901, Hacksell Kerry placed 21st\n\ \ in the 100m dash, with a time of 12.3 seconds, wearing the number 101" [True,False,True,False,True,True,True,False,False,True,True,False,True]
-
real-dice RealDice.Generate.BalancedTables Full-length balanced list of Bools randomized with the RealDice raw data
-
real-dice RealDice.Generate.BalancedTables Prime-length balanced list of Bools randomized with the RealDice raw data
-
real-dice RealDice.Generate.RawData This is raw random data from human interaction with the physical world, converted to a list of Bools
-
real-dice RealDice.Generate.RawData This is raw random data from human interaction with the physical world, truncated to have a prime number of elements, and converted to a list of Bools
getBoolByIndex :: Int -> [Bool] -> Boolreal-dice RealDice.Manipulate.GetValueFromRNGTable Gets a boolean value from a list by index, looping back to the beginning if the index is out of bounds After looping over the list once, we flip the values of the elements so that we can use an odd list length while still having an even distribution of True and False values This is used to get an element from a randomized table of booleans
Examples
>>> getBoolByIndex 2 [True, False, False, True, True] False >>> getBoolByIndex 5 [True, False, False, True, True] False >>> getBoolByIndex 6 [True, False, False, True, True] True >>> getBoolByIndex (-1337) [True, False, True, False, True] False
randomizeWithCustomBools :: [Int] -> [Bool] -> [Int]real-dice RealDice.Manipulate.RandomizeList Randomizes the order of a list of integers using a custom list of booleans
Examples
>>> randomizeWithCustomBools [1, 2, 3, 4, 5] [True, False, False, True, True] [5,4,1,2,3]