indexing

From: Algernon (algernon_at_dmv.com)
Date: 07/10/04

  • Next message: bart demoen: "Re: indexing"
    Date: Sat, 10 Jul 2004 09:54:38 -0400
    
    

    I am sure that I read (but not certain where) something like this. If we
    have a predicate p that performs some operation of a list and an integer (or
    some other type) we should write it with list first p(List,Int) because of
    indexing, Prolog can tell that a goal that unifies with p([],Int) will not
    unify with p([X|Xs]).
    Is this true?


  • Next message: bart demoen: "Re: indexing"

    Relevant Pages

    • Re: Newbie-Question
      ... Prolog tries to unify the variables and then tests, ... If there is a person with sex X and another person (maybe quite ... the predicate different_sex evaluates to true. ...
      (comp.lang.prolog)
    • Re: Sublists question
      ... I do not really get what the predicate means or does. ... >>helps just to write the predicate out clearly in natural language, ... >>then translate into Prolog. ... more as a functional programming language than as a logic ...
      (comp.lang.prolog)
    • Re: Prolog module system
      ... I think prolog offers so much freedom that one can build its own ... Both modules define a member/2 predicate, ... this leads to a name conflict. ... shaky ground as current module systems (look at the issues with e.g. ...
      (comp.lang.prolog)
    • Re: Prolog, memory management and memory leaks
      ... predicate is executed that solves constraint problem. ... In some circumstances, this server leaks memory. ... "Understanding Memory Management in Prolog ... There is not just one garbage collector in Prolog. ...
      (comp.lang.prolog)
    • Re: Prolog module system
      ... my experiment with oop and modules has almost reach a point ... On the other hand, when I came to Prolog as a logic programming language, I ... Consider the length/2 predicate. ... OO systems have much more complex built-in lookup rules. ...
      (comp.lang.prolog)