# fbb449bade7727448922177aaae6139aeaae07c249eddce47fb34369c68a4a61 Elan 1.7.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
