Started functional JS to map problem