有没有办法将元组转换为单独的参数,并将它们放入函数中,而不是绑定到变量上?
类似于:
谢谢。
let nice funOf5 tupleOf5 =
funOf5 (Tuple.toParameters tupleOf5)
替代
let ugly funOf5 tupleOf5 =
let (number1, number2, number3, number4, number5) = tupleOf5
funOf5 number1 number2 number3 number4 number5
谢谢。
<||
和<|||
运算符。 参考链接:https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/operators.%5b-%5bhh-%5d%5b%27t1%2c%27t2%2c%27u%5d-function-%5bfsharp%5d - John Palmer<||
而不是<|
。 - John Palmer