Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
5 lines (4 sloc) 201 Bytes
let assoc = [("one", 1); ("two",2); ("three",3)] ;;
List.Assoc.find assoc "two" ;;
List.Assoc.add assoc "four" 4 (* add a new key *) ;;
List.Assoc.add assoc "two" 4 (* overwrite an existing key *) ;;