I want to have a predicate that has an empty list on the first iteration so
example(Lists,Result) :-
I need result to equal [], the very first time its used, Its a matrix and I want to continually add matrixes to it.
|a,b,c| |j,k,l| |s,t,u|
|d,e,f| |m,n,o| |v,w,x|
|g,h,i|.|p,q,r|,|y,z,?|
/*I want to be able to get back */
|(a+j+s),(b+k+t),(c+l+u)|
|(d+m+v),(e+n+w),(f+o+x)|
|(g+p+y),(h+q+z),(i+r+?)|
These are usually float values.
I need result to be [] the first time for my predicate to work. Is this possible? I know this is a confusing question and a long shot if you will understand it but any help would be great.
Simple truth table. There are 8 possible combinations as you iterate over your list of lists, correct?
Try something like this: