A $k$-edge operation $\varphi$ on a finite set A is a k + 1-ary operation that satisfies the identities $$\matrix{\varphi (x, x,y,\ldots, y)& \approx& \varphi (x, y,x, y,\ldots, y) \approx y\cr \varphi (y, y,y, x,y,\ldots, y)& \approx& \varphi (y, y,y, y,x, y,\ldots, y)\approx \ldots\cr \ldots &\approx &\varphi (y, y,y,\ldots, y,x)\approx y.}$$ We prove that any constraint language ${\rm \Gamma}$ that, for some $k > 1$, has a $k$-edge operation as a polymorphism is globally tractable. We also show that the set of relations definable over. using quantified generalized formulas is polynomially exactly learnable using improper equivalence queries. Special instances of $k$-edge operations are Mal'cev and near-unanimity operations and so this class of constraint languages includes many well known examples.