Advertisement
Guest User

Untitled

a guest
Dec 21st, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. (* this is fine according to Warning 52 *)
  2. let second1 l =
  3. try Some (List.nth l 1) with
  4. | Failure x -> begin
  5. match x with
  6. | "nth" -> None
  7. | _ -> None
  8. end
  9.  
  10. (* but this isn't! *)
  11. let second2 l =
  12. try Some (List.nth l 1) with
  13. | Failure "nth" -> None
  14. | Failure _ -> None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement