Hi, On Fri, Nov 7, 2014 at 6:23 PM, qinwei <[email protected]> wrote: > > args.map(arg => { > coll.insert(new BasicDBObject("pkg", arg)) > arg > }) > > mongoClient.close() > args >
As the results of args.map are never used anywhere, I think the loop body
is not executed at all. Maybe try:
val argsProcessed = args.map(arg => {
coll.insert(new BasicDBObject("pkg", arg))
arg
})
mongoClient.close()
argsProcessed
Tobias
