Skip to content

Commit 76286cc

Browse files
committed
f sequenceResultM docs
1 parent d145e21 commit 76286cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitbook/seq/sequenceResultM.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ let isPrime (x: int) =
4848
else isPrime' x (i + 1)
4949
isPrime' x 2
5050
51-
// int seq -> Result<bool, string list>
51+
// int seq -> Result<bool, string[]>
5252
let checkIfAllPrime (numbers: seq<int>) =
5353
numbers
54-
|> Seq.map isPrime // Result<bool, string> list
55-
|> Seq.sequenceResultM // Result<bool list, string>
54+
|> Seq.map isPrime // seq<Result<bool, string>>
55+
|> Seq.sequenceResultM // Result<bool[], string>
5656
|> Result.map (Array.forall id) // shortened version of '|> Result.map (fun bools -> bools |> Array.forall (fun x -> x = true))'
5757
5858
let a = [ 1; 2; 3; 4; 5 ] |> checkIfAllPrime

0 commit comments

Comments
 (0)