F开发者_JAVA百科or example - I have some terms: moves(1, [1]). moves(1, [2]). moves(1, [3]). How can I get next term?
I was trying a functor translate([3,5,1,3],[three,five,one,three]) which does the operation of printing numbers. I get a strange warning while executing like this,
How can I calculate the length of a list ?- size_sub([[b,a,g], [9,3,7,4], [6]],X). X = [3, 4, 1]. ?- size_sub([[c,g,e,w], [7]],X).
My goal is to have this input: L = [a,b,c], build_tree(L,T). With this output: L = [1,30,kth,5], T = b(l(a),b(l(b),b(l(c)))) ?
For a lark I have started learning Prolog via http://www.learnprolognow.org/. My excuse is that I have only just started.
How do I read data from a text file in Prolog? Is there any example of file reading in SWI-pro开发者_如何转开发log?readfacts:-
this is my source code , can someone tell me what is error , and wat is the best way to do this , i want to show out who matching who ...can somebody help me ?
While troubleshooting a larger assignment for school, I found a mistake I had made, where I was treating a single item list (a stack with one item) as if it were a single item.I solved my issue, howev
Please I need help here, it\'s an assigment A prolog program that shows which cities are in south- east of Nigeria. Here are the cities (abraka, oyo, awka,
I am reading http://cs.union.edu/~striegnk/learn-prolog-now/html/node3.html#subsec.l1.kb1, but I am having trouble running the following predicate: