Specific case: square each element
l
class Function1
{
Object apply(Object x)
{
float num = ((Float)x).floatValue();
return new Float(num*num);
}
}