flyd-forwardto
Create a new stream that passes all values through a function and forwards them to a target stream.
This function is inspired by the Elm function of the same name.
Signature
Stream b -> (a -> b) -> Stream a
Example
// We create a stream of numbersvar numbers = flyd;// And another stream that squares the numbersvar squaredNumbers = flyd;// Add a logger just for showflyd;// For some reason we have a lot of string of numbers, but we can't// send them down the `numbers` stream. That would wreck havoc in the// squaring function. `forwardTo` to the resque!var stringNumbers = ;; // `49` is logged