Implemented assigment based on the makeVector/cachemean example.