diff --git a/docsrc/content/tutorial.fsx b/docsrc/content/tutorial.fsx index 0a14cb579..2fded1807 100644 --- a/docsrc/content/tutorial.fsx +++ b/docsrc/content/tutorial.fsx @@ -104,25 +104,25 @@ But don't forget the above used operators are generic, so we can change the type (*** hide ***) module E2 = -let tryParseInt x : Choice = - match tryParse x with - | Some x -> Choice1Of2 x - | None -> Choice2Of2 ("Failed to parse " + x) - + let tryParseInt x : Choice = + match tryParse x with + | Some x -> Choice1Of2 x + | None -> Choice2Of2 ("Failed to parse " + x) + -let tryDivide x n = - if n = 0 then Choice2Of2 "Can't divide by zero" - else Choice1Of2 (x / n) + let tryDivide x n = + if n = 0 then Choice2Of2 "Can't divide by zero" + else Choice1Of2 (x / n) -(** -The test code remains unchanged, but we get a more interesting functionality -*) + (** + The test code remains unchanged, but we get a more interesting functionality + *) -let parseAndDivide100By = tryParseInt >=> tryDivide 100 + let parseAndDivide100By = tryParseInt >=> tryDivide 100 -let parsedAndDivide100By20 = parseAndDivide100By "20" // Choice1Of2 5 -let parsedAndDivide100By0' = parseAndDivide100By "zero" // Choice2Of2 "Failed to parse zero" -let parsedAndDivide100By0 = parseAndDivide100By "0" // Choice2Of2 "Can't divide by zero" + let parsedAndDivide100By20 = parseAndDivide100By "20" // Choice1Of2 5 + let parsedAndDivide100By0' = parseAndDivide100By "zero" // Choice2Of2 "Failed to parse zero" + let parsedAndDivide100By0 = parseAndDivide100By "0" // Choice2Of2 "Can't divide by zero" (**