notes on lambda function, map, filter and reduce used in combination