File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,28 @@ let methods2 = System.AppDomain.CurrentDomain.GetAssemblies()
395
395
|> Array.concat
396
396
```
397
397
398
+ For reverse pipeline ` <| ` operators, place arguments on new lines and align them with the first argument:
399
+
400
+ ``` fsharp
401
+ // ✔️ OK
402
+ failwith <| sprintf "foobar: %s - foobarbaz: %s"
403
+ foobar
404
+ foobarbaz
405
+
406
+ // ✔️ OK
407
+ let message = sprintf "error: %s, details: %s"
408
+ <| errorMsg
409
+ <| details
410
+
411
+ // ✔️ OK
412
+ let result = someFunction <| arg1
413
+ <| arg2
414
+ <| arg3
415
+
416
+ // ❌ Not OK
417
+ failwith <| sprintf "foobar: %s - foobarbaz: %s" foobar foobarbaz
418
+ ```
419
+
398
420
### Formatting lambda expressions
399
421
400
422
When a lambda expression is used as an argument in a multi-line expression, and is followed by other arguments,
@@ -571,6 +593,7 @@ The following operators are defined in the F# standard library and should be use
571
593
``` fsharp
572
594
// ✔️ OK
573
595
x |> f // Forward pipeline
596
+ f <| x // Reverse pipeline
574
597
f >> g // Forward composition
575
598
x |> ignore // Discard away a value
576
599
x + y // Overloaded addition (including string concatenation)
You can’t perform that action at this time.
0 commit comments