The missing flatMap function for Node