JavaScriptにもflatMapを！ ref: http://qiita.com/alucky0707/items/88bd35208b12243768ac