|
From: | Sean Charles |
Subject: | Re: Predicate ordering when using current_predicate/1 |
Date: | Sat, 23 Nov 2013 12:19:52 +0000 |
On 23 Nov 2013, at 11:28, Daniel Diaz <address@hidden> wrote:
Thanks. Praise indeed. Sadly lacking in the day job lately!
I wasn’t sure about that either because I am returning a pair with Line-Name i.e. line-number and test function and I wasn’t sure *how* the default sort would handle that so I rolled my own. Basically I was not sure what the collation order would be for my list. I don’t think the documentation says what it does to determine the ordering so I took no chances! I *will* take it out and see what happens though. In the documentation it says that it uses "sort(I,Instances)” but I couldn’t seem to relate that to my code. I will re-visit and try to understand again. One thing I know, it is worth getting good with the debugger which I am quite familiar with now.
Lunch beckons, that some basketball with my son but tonight I hack for England. Having learned Lisp, Erlang, Haskell I am starting to think that Prolog is what I have been “yearning for” all my life! Oh my god, did I just say that! Yes, you did, no go out and get a life :) All the best, Sean.
|
[Prev in Thread] | Current Thread | [Next in Thread] |