I am trying to create a prolog function that gets a small multiplication table based on the first value pased to the function.
My code is currently as follows:
mult(n, [[[n, 1], n*1], [[n,2], n*2], [[n,3], n*3]]).
So for example I would like a query such as:
?- mult(5, R).
To display something like:
R = [[[5,1],5], [[5,2],10], [[5,3], 15]]
However, currently this query only returns false, how could I fix my code?