When I create a checker pattern using the rect function, it works perfectly:
@svg begin
Drawing(2000,2000)
background("white")
sethue("black")
rect(500,0,500,500,:fill)
rect(1500,0,500,500,:fill)
rect(0,500,500,500,:fill)
rect(1000,500,500,500,:fill)
rect(500,1000,500,500,:fill)
rect(1500,1000,500,500,:fill)
rect(0,1500,500,500,:fill)
rect(1000,1500,500,500,:fill)
end
but when I try to do the same thing using a for loop, it doesn’t draw:
@svg begin
Drawing(2000,2000)
sethue("black")
let
x=500
y=0
map(0:4) do i
map(0:2) do i
rect(x,y,500,500)
x=x+1000
end
y=y+50
x=abs(x-2500)
end
end
end
Why is that?