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
+1 -1
View File
@@ -26,7 +26,7 @@ makeDoorDebris dr w = w & makeDebris mt col p
return (_wlMaterial wl, _wlColor wl)
makeBlockDebris :: Block -> World -> World
makeBlockDebris bl w = foldr (makeDebris mt col) w ps
makeBlockDebris bl w = foldl' (flip $ makeDebris mt col) w ps
where
dsize = debrisSize mt
ps = gridInPolygon dsize $ shrinkPolyOnEdges dsize $ reverse (_blFootprint bl)