On generalized Halley-like methods for solving nonlinear equations