Fix whitespace
This commit is contained in:
parent
7ec9fbe884
commit
366bce49a6
@ -13,9 +13,9 @@ parseDiceware x = map (last . split ' ') $ lines x
|
||||
-- Lookup word with dice index
|
||||
readDiceware :: Diceware -> Int -> String
|
||||
readDiceware d n = show n ++ " -> " ++
|
||||
case (undice n) of
|
||||
Just x -> d !! x
|
||||
Nothing -> "Does not exist"
|
||||
case (undice n) of
|
||||
Just x -> d !! x
|
||||
Nothing -> "Does not exist"
|
||||
|
||||
-- Lookup word with linear index
|
||||
readDiceware' :: Diceware -> Int -> String
|
||||
@ -25,4 +25,4 @@ readDiceware' d n = d !! n
|
||||
-- Ex. undice 11121 == Just 6
|
||||
undice :: Int -> Maybe Int
|
||||
undice n = elemIndex n . filter
|
||||
(null . (intersect "0789") . show) $ [11111..66666]
|
||||
(null . (intersect "0789") . show) $ [11111..66666]
|
||||
|
Loading…
Reference in New Issue
Block a user