For example, given the collection of numbers:
- 1, 2, 3, 4, 5
And the operation:
- square a number
Your code should be able to produce the collection of squares:
- 1, 4, 9, 16, 25
-
Square Root a Number
-
Cube a number
-
Even and Odd
-
Or return an object containing all of those things:
{ original: [1, 2, 3, 4, 5], squares: [...], squareRoots: [...], cubes: [...], evenAndOdd: [true, false, true] }
Keep your hands off that collect/map/fmap/whatchamacallit functionality provided by your standard library!
Solve this one yourself using other basic tools instead.