Example #1
0
 public function testFreshWithNoVariables()
 {
     $x = fresh(function () {
         return conjPlus(eq(1, 1));
     });
     $result = $x(emptyState());
     $this->assertEquals('((() . 0))', sprintf('%s', take(1, $result)));
 }
Example #2
0
function callGoal($g)
{
    return $g(emptyState());
}
Example #3
0
 public function testManyNonAns()
 {
     $g = manyNonAns();
     $h = $g(emptyState());
     $this->assertEquals('((((#(0) . 3)) . 1))', sprintf('%s', take(1, $h)));
 }