converted use of `reduce` to `into`, and use of `map`+`if` to `for` expression with :when
converted use of `reduce` to `into`, and use of `map`+`if` to `for` expression with :when

marick/Midje,bens/Midje,aeriksson/Midje,yfractal/Midje