Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # let mylist = ref [('a',1);('b',2)];;
- val mylist : (char * int) list ref = {contents = [('a', 1); ('b', 2)]}
- # let ch = ref (List.find (fun x->(fst x)='a') !mylist);;
- val ch : (char * int) ref = {contents = ('a', 1)}
- # ch:= ((fst !ch), (snd !ch)+1);;
- - : unit = ()
- # mylist;;
- - : (char * int) list ref = {contents = [('a', 1); ('b', 2)]}
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement