def 八(距離:Double, pm:Int) { if(距離 > 2) { for(i<-1 to 30) { forward(距離) ; left(pm*360/30) if(i%10==0) 八(距離*0.6,-pm) } } } clear ; 八(10,1)