implemented Nary unification using CPS