Transform Ranges
Now we will study std::transform which is used to perform transformations on a range.
The std::transform
algorithm applies a unary or binary callable to a range and copies the modified elements to the destination range.
Applies the unary callable fun
to the elements of the input range and copies the result to result
: