Closed ghost closed 2 years ago
Operators can be defined by users in OCaml as described in the page that you are linking.
The blog is said OCaml has a built in operator @@
@@ | Function application (f @@ x is the same as f x)
-- | --
Is that correct?
From the language perspective, there is no built-in operators at all in OCaml. All infix operators are defined as ordinary functions. However, the standard library defines some operators, thus one may speak of built-in operators in the standard library.
Wrong: https://ocaml.janestreet.com/ocaml-core/odoc/stdlib/Stdlib/Pervasives/index.html
I try my best to search and find. i can see it defined as ocaml core. . If any one looking for where the operator from. may help you out.
Right link https://v2.ocaml.org/api/Stdlib.html#VAL(@@)
The right location is here: https://ocaml.org/api/Stdlib.html#VAL(@@) . You are linking another library.
I have no idea. but the web page search rank , janestreet is top than ocaml.org. thanks for your help. you tips me the right document.
https://v2.ocaml.org/manual/expr.html I can not find the
@@
operatorshould this page update to link all operators of OCaml.
I read a blog describe more operators than the official document. https://www.brendanlong.com/ocaml-operator-cheatsheet.html