The compiler, given the following code, tells me "Use of unassigned local variable 'x'." Any thoughts?
public delegate Y Function<X,Y>(X x);
public class Map<X,Y>
{
private Function<X,Y> F;
public Map(Function f)
{
F = f;
}
public Collection<Y> Over(Collection<X> xs){
List<Y> ys = new List<Y>();
foreach (X x in xs)
{
X x2 = x;//ys.Add(F(x));
}
return ys;
}
}