摘要: --自己实现迭代器functionget_each_fun(array)locali=0locallength=table.getn(array);returnfunction()i=i+1;return(i>lengthandnil)orarray[i];endendlist={1,3,5,7,9}foriteminget_each_fun(list)doprint(item)endprint'-----------------------------------------------------'foriteminget_each_fun(list)doprint( 阅读全文
posted @ 2012-07-03 18:00 再快一点 阅读(217) 评论(0) 推荐(0) 编辑