chapter 8 exercise 8-2

implement remove, transform, partition, accumulate standard algorithm