函数中以波浪号~开头的参数是什么意思?

What is the meaning of parameters starting with tilde ~ in functions?

函数中以波浪号 ~ 开头的参数的含义是什么,如本例所示:

let draw_line ~img ~color ~p0:(x0,y0) ~p1:(x1,y1) = ...

它们是命名参数,标签与形式参数名称相同:

# let divide ~num ~den = num /. den;;
val divide : num:float -> den:float -> float = <fun>
# divide ~den:10.0 ~num:30.0;;
- : float = 3.

这在函数定义 here.

中有描述