Replace some foldr with foldl'
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user