Ad
  • Custom User Avatar

    Thanks for the comment :)
    I know it could have been done with one iteration with reduce, but this way mapping and summing are not wired together. Easier to read and until it does not cause performance issues I prefer these kind of solutions.
    I use this pattern to introduce separation of conserns to my students as well :)