Defining initScalar in terms of initArray.
Defining initScalar in terms of initArray.
mapP using initArray. Removed commented out old code.
Fixed scan, scanTest and added scanExample. scan did the subtraction by 1 outside the bracket.