📅  最后修改于: 2021-01-01 04:33:10             🧑  作者: Mango
单位类型是指示没有特定值的类型。单元类型只有一个值,当不存在其他值时将充当占位符。
let function1 x y = x + y
function1 10 20 // this line results a compiler warning
// changing the code to the following, eliminates the warning
let result = function1 10 20
// Use this if you are calling the function and don't want the return value
function1 10 20 |> ignore