ChrisMarinos / FSharpKoans

A simple, fun, and interactive way to learn the F# language through testing.
Other
1.28k stars 671 forks source link

TheBackwardPipeOperatorCanAlsoHelpWithGrouping - Add De-Emphasis Note? #105

Open JustinGrote opened 2 years ago

JustinGrote commented 2 years ago

Don Syme, etc. have mentioned the backward pipe is now considered bad practice (like backticks in Powershell), so should this koan have a note that this pattern is discouraged in favor of pipelining and that typically you would do this instead?

    [<Koan>]
    let TheBackwardPipeOperatorCanAlsoHelpWithGrouping() =
        let add x y =
            x + y

        let double x =
            x * 2

        let result =
            add 5 8
            |> double

        AssertEquality result 26