Is it possible to use pipes in OCaml?
问题 In F# I can't live without pipes ( <| and |> ) let console(dashboard : Dashboard ref) = let rec eat (command : string) = command.Split(' ','(',')') |> Seq.filter(fun s -> s.Length <> 0) |> fun C -> (Seq.head C).ToUpper() |> fun head -> Can I use <| and |> in OCaml? 回答1: These are available since OCaml 4.01. However, <| is named @@ there, so it has the correct operator associativity. Alternatively, you can either define them yourself: let (|>) v f = f v let (<|) f v = f v (* or: *) let (@@) f