dada
void main(){ var list = ["wo", "kao", "1", "20.5"]; var result = listTime3(list, times3); print(result); } listTime3(list,times3(item)){ for (var index = 0; index < list.length; index ++){ list[index] = times3(list[index]); } return list; } times3(item) { return item*3; }
void main(List args){ var list = ["wo", "kao", "1", "20.5"]; var result = listTime3(list, times3); print(result); } listTime3(List list,String times3(String item)){ for (var index = 0; index < list.length; index ++){ list[index] = times3(list[index]); } return list; } String times3(String item) { return item*3; }