Skip to content

Instantly share code, notes, and snippets.

@Desetude Desetude/ Secret
Last active Dec 1, 2018

What would you like to do?
let rec find_first_duplicate_sum (h::t) (sum::history) =
if List.mem h (sum::history) ~equal:(=) then
find_first_duplicate_sum (t @ [h]) ((sum + h)::sum::history)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.