Initial implementation of map function and associated tests

Implementation of a map function in index.js.  Associated unit tests
for the map function are located in the tests folder.