public void t_modifying_a_list()
        {
            Delegate d = new DelegateParameter2(modify_list);

            PlEngine.RegisterForeign(d);
            for (int i = 1; i < 10; i++)
            {
                PlTerm t = PlQuery.PlCallQuery("modify_list([a,b,c], L)");
                Assert.AreEqual("[aa,bb,cc]", t.ToString(), "modify_list failed!");
            }
        }
        public void t_in_out()
        {
            Delegate replaceDelegate = new DelegateParameter2(atom_replace);

            PlEngine.RegisterForeign(replaceDelegate);
            for (int i = 1; i < 10; i++)
            {
                var arg = new PlTermV(new PlTerm("test_f"), PlTerm.PlVar());
                PlQuery.PlCall("atom_replace", arg);
                Assert.AreEqual("test_xx_f", arg[1].ToString(), "atom_replace failed!");
            }
        }