tweaks on ocaml match

This commit is contained in:
NunoSempere 2023-10-15 02:25:59 +01:00
parent 3befb4af4d
commit 50fb88db7c
5 changed files with 4 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -56,10 +56,10 @@ let unwindSum xs =
let unwindSumArray xs = let unwindSumArray xs =
Array.fold_left(fun acc x -> Array.fold_left(fun acc x ->
( (
match (acc, x) with match acc, x with
| (Error e, _) -> Error e | Error e, _ -> Error e
| (_, Error e) -> Error e | _, Error e -> Error e
| (Ok(sum), Ok(y)) -> Ok(sum +. y) | Ok(sum), Ok(y) -> Ok(sum +. y)
) )
) (Ok 0.0) xs ) (Ok 0.0) xs