<div dir="ltr">It defines a relation. We have that X gives reflux if:<div><br></div><div> 1) X reminds you of Y</div><div> 2) Y gives you reflux.</div><div><br></div><div>You can then ask the prolog system to search for all X satisfying the reflux condition and it will give you back several possible answers. One will be ruby, since it reminds you of vb and vb gives reflux. But that means elixir also gives reflux since it reminds you of ruby and ruby gives reflux.</div>
<div><br></div><div>I would like to see more prolog-like features in Erlang btw :)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 11:29 PM, Ludovic Demblans <span dir="ltr"><<a href="mailto:ludovic@demblans.com" target="_blank">ludovic@demblans.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wow this prolog thing is hard to grasp on a first sight ...<br>
<br>
does 'reminds_of(X,Y) binds Y 'ruby' if we pass 'elixir' as X in 'reflux(X)' ?<br>
<br>
Le Mon, 10 Feb 2014 22:34:50 +0100, Anthony Ramine <<a href="mailto:n.oxyde@gmail.com" target="_blank">n.oxyde@gmail.com</a>> a écrit:<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you like Prolog, there is also Robert Virding’s Erlog:<br>
<br>
<a href="https://github.com/rvirding/erlog" target="_blank">https://github.com/rvirding/<u></u>erlog</a><br>
<br>
reflux(vb).<br>
<br>
reminds_of(ruby, vb).<br>
reminds_of(elixir, ruby).<br>
<br>
reflux(X) :-<br>
reminds_of(X, Y),<br>
reflux(Y).<br>
<br>
</blockquote>
<br>
<br>
-- <br></div>
Utilisant le logiciel de courrier révolutionnaire d'Opera : <a href="http://www.opera.com/mail/" target="_blank">http://www.opera.com/mail/</a><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>J.
</div>