简体   繁体   中英

What does |> mean in Ocaml?

I was reading some source code and came across |>

I tried googling but it is too hard to google symbols.

I am new to Ocaml, can anyone explain? Please and thank you!

http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#6_Compositionoperators

It is a reverse application operator; the argument goes on the left, the function to apply to the argument on the right.

x |> f = f x

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM