Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not in my version of OCaml (OCamlWinPlus v1.9RC4, OCaml version 4.01.0):

  # if false then print_endline "false" ; match () with () -> print_endline "match";;
  match
  - : unit = ()


Sorry I realized my mistake and deleted my comment before I saw yours.

FTR, I was saying that the ";" in the `then` clause of the if statement didn't end it, but it actually does. I see that arjunnarayan got this wrong too in his comment here: https://news.ycombinator.com/item?id=8498187.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: