Dot product: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
(→{{header|Vlang}}: Rename "Vlang" in "V (Vlang)") |
||
Line 3,264: | Line 3,264: | ||
<pre>3</pre> |
<pre>3</pre> |
||
=={{header|Vlang}}== |
=={{header|V (Vlang)}}== |
||
<syntaxhighlight lang="vlang">fn dot(x []int, y []int) ?int { |
<syntaxhighlight lang="v (vlang)">fn dot(x []int, y []int) ?int { |
||
if x.len != y.len { |
if x.len != y.len { |
||
return error("incompatible lengths") |
return error("incompatible lengths") |