summaryrefslogtreecommitdiff
path: root/2023/ocaml
diff options
context:
space:
mode:
Diffstat (limited to '2023/ocaml')
-rw-r--r--2023/ocaml/day4/bin/main.ml6
1 files changed, 1 insertions, 5 deletions
diff --git a/2023/ocaml/day4/bin/main.ml b/2023/ocaml/day4/bin/main.ml
index 9d1a6ad..fdc3553 100644
--- a/2023/ocaml/day4/bin/main.ml
+++ b/2023/ocaml/day4/bin/main.ml
@@ -30,11 +30,7 @@ let rec parse ?(result = 0) lines =
let k =
Int.shift_left 1
- (List.length
- (List.map
- (fun win -> if List.mem win plays = true then 1 else 0)
- winnings
- |> List.filter (fun i -> i = 1))
+ (List.length (List.filter (fun win -> List.mem win plays) winnings)
- 1)
in