changed to.equal to to.eql to make tests for high-order functions pass