From 83fdd179f471ab952771e86ec17cf47934fde16f Mon Sep 17 00:00:00 2001 From: sabadev Date: Sat, 10 Apr 2021 00:17:48 -0400 Subject: [PATCH] Eta-reduction for randomRange. --- src/Game.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Game.hs b/src/Game.hs index 670f992..3bd4ab6 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -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) -- 2.20.1