We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfd64d8 commit 3b71915Copy full SHA for 3b71915
gitbook/seq/sequenceResultM.md
@@ -48,11 +48,11 @@ let isPrime (x: int) =
48
else isPrime' x (i + 1)
49
isPrime' x 2
50
51
-// int seq -> Result<bool, string list>
+// int seq -> Result<bool, string[]>
52
let checkIfAllPrime (numbers: seq<int>) =
53
numbers
54
- |> Seq.map isPrime // Result<bool, string> list
55
- |> Seq.sequenceResultM // Result<bool list, string>
+ |> Seq.map isPrime // seq<Result<bool, string>>
+ |> Seq.sequenceResultM // Result<bool[], string>
56
|> Result.map (Array.forall id) // shortened version of '|> Result.map (fun bools -> bools |> Array.forall (fun x -> x = true))'
57
58
let a = [ 1; 2; 3; 4; 5 ] |> checkIfAllPrime
0 commit comments