Added support for map() and a testcase