Applying a function to a list.
I've created two functions and applied them to a list of numbers, hoping to obtain a list of function values. This works for one of the two functions, but not the other.
I've attached a file that contains this problem. In the file, the function g works as expected, but the function f does not. The function f is being applied to each member of the list, and then the results summed, whereas the function g is being applied to each member of the list, and the results are collected in a new list. (The latter is the desired behaviour.)