sequence.concatMap(mappingFunction) -> stream
array.concatMap(mappingFunction) -> array
Flattens a sequence of arrays returned by the mappingFunction
into a single sequence.
Construct a sequence of all monsters defeated by Marvel heroes. Here the field 'defeatedMonsters' is a list that is concatenated to the sequence.
r.table('marvel').concatMap(function(hero) {
return hero('defeatedMonsters')
}).run(conn, callback)