Is there a pre-existing function to pass a tuple as args?

瘦欲@ 提交于 2019-12-10 16:45:41

问题


I want to apply a regular function that takes two arguments to a tuple. I defined a helper function like so:

let apply f (a, b) =
    f a b

However I feel like this must be a fairly common use case and wondered if it was a function in the standard library (I'm not sure what terms to search for)


回答1:


The double forward pipe (||>) does this.



来源:https://stackoverflow.com/questions/21840206/is-there-a-pre-existing-function-to-pass-a-tuple-as-args

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!