in reply to Re: Introducing Scheme In Perl 6
in thread Introducing Scheme In Perl 6
because my *ultimate* goal is to use this to embed the logic programming language Kanren into Perl 6, which is a set of Scheme primitives that provide goal-searching and backtracking. You could do something like:use Slang::Scheme::Guile; guile-sub add( $a, $b ) { + $a $b } say add(1,3); # 4
This is of course fairly abstract, and I haven't really researched what the function binding is, I've been working more on the Scheme side.use Slang::Kanren; kanren-fact parent('marcia','jeff'); kanren-fact parent('mike','jeff'); kanren-fact parent('gerald','mike'); # Find out if Jeff shares a common parent with Gerald kanren-goal { parent('gerald',X), parent(X,'jeff') }
|
|---|