list dot - part-cw/lambdanative GitHub Wiki

(list-dot lst1 lst2)

list-dot returns the dot product (inner product) of two lists

Parameter Description
lst1 First list operated on
lst2 Second list operated on

Example

Example 1: Calculate the dot product of two lists using both the regular and optimized forms.

> (list-dot (list 1 2 3 4) (list 1 2 3 4))
30
> (list-fldot (list 1. 2. 3.) (list 1. 2. 3.))
14.