Created
January 23, 2018 08:55
-
-
Save Bloofer/187bcb26a1c070c9a09a64d2acddfe7e to your computer and use it in GitHub Desktop.
mismatch.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Core.Std | |
let find_mismatches map1 map2 = | |
Map.to_sequence map1 | |
|> Sequence.filter_map ~f:(fun (key, data) -> | |
match Map.find map2 key with | |
| None -> None | |
| Some data' -> | |
if data' <> data then Some key | |
else None | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment