How would I write imapInto using mutable vectors?
===

This is related to this question:

http://stackoverflow.com/questions/11478268/dont-know-where-to-start-with-mutable-vectors

How would I write a function that took values from one vector, transformed them and put the results into a second vector?  More specifically, it should iterate over all the indexes of a source array, and hand that index and the array to a function, then store the result of the function in another array. 

I think the signature would look something like this:

    imapInto :: (PrimMonad m, Unbox a) => (MVector (PrimState m) a -> Int -> a) -> MVector (PrimState m) a -> MVector (PrimState m) a  -> m ()

And would be called something like this:
import Data.Vector.Unboxed.Mutable MV

    ...
    let dst = MV.replicate 10 0.0 in
    let src = MV.replicate 10 1.0 in
    imapInto (\src' i -> (src' * 2.0)) dst src
    ...

Which would multiply all the elements in src by 2 and put the results into dst, yielding a state unit.

