Advertisement
Guest User

Untitled

a guest
Apr 8th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.26 KB | None | 0 0
  1. type t = { a : int; b : int }
  2.  
  3. let () =
  4.     let value = { a = 1; b = 2} in
  5.  
  6.     (* This works *)
  7.     let x = match value with | { a; _ } -> a  in print_int x
  8.    
  9.     (* Changing the above to this fails: *)
  10.     (* let x = match value with | { _; b } -> b  in print_int x *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement