view Assets/Application/Scripts/Test/Functor.cs @ 13:e297afe0889d default tip

Add Prefab.
author Kazuma Takeda
date Tue, 07 Feb 2017 20:49:26 +0900
parents
children
line wrap: on
line source

using System.Collections.Generic;

public class Functor {

	public static List<T> map<T> (System.Func<T, T> f, List<T> list) {
		List<T> newList = new List<T> ();
		foreach (var num in list) {
			newList.Add (f (num));
		}
		return newList;
	}
}