Hi
I am trying to write predicates to process the following
simplify([[1,2,3], plus, [3,4,5]],X).
X = [5,7,15]
any tips welcome?
below is my code so far
1 2/3 + 3 4/5
5/3 + 19/5
(25+57)/15 = 82/15 = 5 7/15
format [1,2,3] to 5/3
multiply ([1,2,3],[3,0,0], [X,Y,Z]).
X=[5]
Y=[0]
Z=[0]...
Hi
I am trying to teach myself prolog and as I am totally new to this I thought some help wouldn't be a bad idea.
My first challenge is to write a prolog predicate that takes two arguments. The first is a list and the predicate should return the list reversed as the second argument.
e.g...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.