Yeah, once I've gotten the binding down I hope to be able to do something like:
use Slang::Scheme::Guile;
guile-sub add( $a, $b ) { + $a $b }
say add(1,3); # 4
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::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') }
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.