Applies the passed function f to each state, producing a new transformed Signal value.
Note: f should be a pure function.