let passFive f = (f 5)
let passFive f = f 5
What's difference between them?
I found they are both like below:
val passFive: (int -> 'a) -> 'a
They are both the same and brackets ( parentheses ) here are used like anywhere else where you want to group together the operands and increase their precedence.
printfn "%A" myfunc 5
will give error.
printfn "%A" (myfunc 5)
is how it is supposed to be written.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.