ocaml / v2.ocaml.org

Implementation of the ocaml.org website.
http://ocaml.org
Other
323 stars 351 forks source link

Missing operator '@@' #1627

Closed ghost closed 2 years ago

ghost commented 2 years ago

https://v2.ocaml.org/manual/expr.html I can not find the @@ operator

should 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

Octachron commented 2 years ago

Operators can be defined by users in OCaml as described in the page that you are linking.

ghost commented 2 years ago

The blog is said OCaml has a built in operator @@


@@ | Function application (f @@ x is the same as f x)
-- | --

Is that correct?

Octachron commented 2 years ago

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.

ghost commented 2 years ago

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(@@)

Octachron commented 2 years ago

The right location is here: https://ocaml.org/api/Stdlib.html#VAL(@@) . You are linking another library.

ghost commented 2 years ago

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.