# 4cd4d55792c28ed94e8cdcf932c07e0a0cd6f8a187923c9fe099476db1903731 Elan 1.8.0 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
