Are double forward / backward pipe operators documented?

I remember reading about double pipe operators - || > and & lt || || - somewhere, and now I can’t remember where. I can not find them on MSDN or in the language specification. Are they documented anywhere?

Example

let print ab = sprintf "%O %O" ab (1, 2) ||> print // val it : string = "1 2" 
+7
f #
source share
2 answers

The double (forward / backward) pipe operators are documented in the F # statement list on MSDN and are also documented as a function exported from the Core.Operators module .

This is probably automatically generated from the XML documentation in F # sources, so the pages have a few cryptic names:

As a remark, searching for an operator using search engines is a problem, so I looked in the sources of F # (distributed with the release of CTP), and prim-types.fs includes the following:

 /// <summary>Apply a function to two values, the /// values being a pair on the left, the function on the right</summary> /// <param name="arg1">The first argument.</param> /// <param name="arg2">The second argument.</param> /// <param name="func">The function.</param> /// <returns>The function result.</returns> val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U 

I was going to recommend F # sources as good documentation for these kinds of things (which they certainly are), but then I inserted the <summary> tag part in google and found the pages mentioned above :-).

+6
source share

See @Tomas answer. The key aspect is that these are just functions in the library, so you want to look in library documents (and Core.Operators contains these guys).

+1
source share

All Articles