Change Array.reduce notation to Array#reduce