Y
Hacker News
new
|
ask
|
show
|
jobs
by
pcstl
2444 days ago
~ does indeed denote named arguments. To call a function named f which has an argument named arg with arg set to the value x, the syntax is:
f ~arg:x
1 comments
gpderetta
2444 days ago
But what about ~buf here:
let len = Core.In_channel.input in_ch ~buf ~pos:0 ~len:buf_size
link
test9753
2444 days ago
~buf is shorthand for ~buf:buf
link
gpderetta
2444 days ago
Oh, nice.
link