Cleanup, improve auto wall rotate
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ takeOneRem :: (RandomGen g) => [a] -> State g (Maybe (a, [a]))
|
||||
takeOneRem [] = return Nothing
|
||||
takeOneRem xs =
|
||||
state (randomR (0, length xs - 1)) >>= \i -> do
|
||||
let (ys, (z : zs)) = splitAt i xs
|
||||
let (ys, z : zs) = splitAt i xs
|
||||
return $ Just (z, ys <> zs)
|
||||
|
||||
takeOneFiltered :: (RandomGen g) => (a -> Bool) -> [a] -> State g (Maybe a)
|
||||
|
||||
Reference in New Issue
Block a user