address remaining vertical duplicate issue (I was returning 1 from getTopmostY's loop, when I was meant to be returning 0)
This commit is contained in:
@@ -348,9 +348,7 @@ struct
|
|||||||
|
|
||||||
local
|
local
|
||||||
fun loop (x, y, ex, ey, grid) =
|
fun loop (x, y, ex, ey, grid) =
|
||||||
if y = 0 then
|
if y = 0 orelse ey = 0 then
|
||||||
1
|
|
||||||
else if ey <= 0 then
|
|
||||||
0
|
0
|
||||||
else if quadHasSameColour (x, y, ex, ey, grid) then
|
else if quadHasSameColour (x, y, ex, ey, grid) then
|
||||||
loop (x, y - 1, ex, y, grid)
|
loop (x, y - 1, ex, y, grid)
|
||||||
@@ -492,6 +490,10 @@ struct
|
|||||||
val length = List.length list
|
val length = List.length list
|
||||||
val _ = print ("length = " ^ Int.toString length ^ "\n")
|
val _ = print ("length = " ^ Int.toString length ^ "\n")
|
||||||
|
|
||||||
|
val _ = print "start fold\n"
|
||||||
|
val _ = List.foldl (fn (item, _) => printItem item) () list
|
||||||
|
val _ = print "finish fold\n"
|
||||||
|
|
||||||
val f = folder
|
val f = folder
|
||||||
( windowWidth
|
( windowWidth
|
||||||
, windowHeight
|
, windowHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user