Ivan Dilchovski·Follow1 min read·Feb 24, 2017--1ShareYou could simplify the implementation with reduce.