Replace some foldr with foldl'

This commit is contained in:
2022-08-23 15:40:15 +01:00
parent 12ce2365c2
commit 9f00e67298
11 changed files with 35 additions and 30 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
module Dodge.Combine.Module where
import Data.Foldable
import Dodge.Item.Targeting
import Dodge.Data.Beam
import Dodge.Data.Item
--import Dodge.Item.Weapon.ExtraEffect
import Dodge.Tesla
import Geometry
import LensHelp
@@ -53,4 +53,4 @@ moduleModification imt = case imt of
-- a = argV (mouseWorldPos w -.- p)
applyModules :: Item -> Item
applyModules it = foldr moduleModification it (_iyModules (_itType it))
applyModules it = foldl' (flip moduleModification) it (it ^. itType . iyModules)