結果 : java apply function to every element in array