Measurable functionals on function spaces