# 60312999c7f22387934424c0cba9e33695a0c354c415a2e4eae8be0ef89b84e5 Elan 1.6.2 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
