Generalization of the Lambert W function