# d355c891928252f34fbe05a118100d044970839eefcff4b1fa85a51bbd343645 Elan 1.6.1 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
