Code in Prolog. Do not use in built libraries.
- Implement the following relation to get a scalar product from two list of numbers.
- prodScalar
- It should work like the following:
?- prodScalar([], [], P).
P = 0.
?- prodScalar([3], [4], P).
P = 12.
?- prodScalar([3, 2], [4, 2], P).
P = 16 .
?- prodScalar([3, 2, 4], [4, 2, 2], P).
P = 24 .
?- prodScalar([3, 2, 4], [4, 2, 0], P).
P = 16 .