# 35542edef99e18ecec12e1e8f679628c40e6cabab3371dc8f9cf076b396f6b47 Elan 1.6.4 guest default_profile valid

main
  variable t set to new Turtle()
  call t.placeAt(-50, 30)
  call t.turn(90)
  call t.show()
  for i from 1 to 3 step 1
    call drawSide(side, t)
    call t.turn(120)
  end for
end main

procedure drawSide(length as Float, t as Turtle)
  if (length > 1) then
    let third be length/3
    call drawSide(third, t)
    call t.turn(-60)
    call drawSide(third, t)
    call t.turn(120)
    call drawSide(third, t)
    call t.turn(-60)
    call drawSide(third, t)
  else
    call t.move(length)
  end if
end procedure

constant side set to 60
