Eta-reduction for randomRange. main
authorsabadev <saba@sabadev.xyz>
Sat, 10 Apr 2021 04:17:48 +0000 (00:17 -0400)
committersabadev <saba@sabadev.xyz>
Sat, 10 Apr 2021 04:17:48 +0000 (00:17 -0400)
src/Game.hs

index 670f992..3bd4ab6 100644 (file)
@@ -144,7 +144,7 @@ randomResult :: (Random a) => RandomState a
 randomResult = randomAction random
 
 randomRange :: (Random a) => (a, a) -> RandomState a
-randomRange bounds = randomAction $ G.getRandom bounds
+randomRange = randomAction . G.getRandom
 
 enemyStartPosition :: Direction -> RandomState G.Coords
 enemyStartPosition U = randomRange (fst topLeftBoundary, fst bottomRightBoundary) >>= \column -> return (snd bottomRightBoundary, column)