Added a test for adt.map functionality
Implement adt.map (which fixes problems with Array.map which add additional arguments)