pastebin
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
pastebin
Follow @pastebin
create new paste
trending pastes
sign up
login
my settings
my profile
My Pastes
Public Pastes
Untitled
1 sec ago
Untitled
1 sec ago
Untitled
8 sec ago
Detroit Red Wings vs Ph...
17 sec ago
grgdrg
8 sec ago
Untitled
8 sec ago
Untitled
13 sec ago
D&D short log Feb. ...
13 sec ago
Layout Width
Share Pastebin
Untitled
By: a guest | Mar 20th, 2010 | Syntax:
OCaml
| Size: 0.10 KB | Hits: 87 | Expires: Never
Download
|
Raw
|
Embed
|
Report abuse
let
rec
dotproduct
=
a
::
r, b
::
s
->
(
a
*.
b
)
+.
(
dot_product r s
)
..
or
a
::
r, b
::
s
->
loop
(
a
*.
b
)
r s
create new paste
|
create new version of this paste
RAW Paste Data
let rec dotproduct = a::r, b::s -> (a *. b) +. (dot_product r s).. or a::r, b::s -> loop (a *. b) r s