Download code

Jump to: navigation, search

Back to Dot_product_(Prolog)

Download for Windows: single file, zip

Download for UNIX: single file, zip, tar.gz, tar.bz2

dot.pl

1 dot([], [], 0).
2 dot([H1|T1], [H2|T2], X) :-
3     dot(T1, T2, X0),
4     X is H1 * H2 + X0.
5