Closed moonlightdrive closed 9 years ago
Thanks! I'm surprised at the size of the fix. I've left a couple line comments but otherwise it looks really good.
I made the changes you suggested.
What's the reasoning behind not using the if statement? Is it just more pleasant/legible without "if", or is it something else?
Thanks! Both the fix and the test cases look good to me. There seems to be a strange failure in Yorick as regards use of |>
though -- not sure what's going on there (or that it's related to this PR at all)
File "travis_opam.ml", line 146, characters 6-8:
Error: Unbound value |>
This is due to ocaml/ocaml-travisci-skeleton#58 at https://github.com/ocaml/ocaml-travisci-skeleton/pull/58/files#diff-9846f191f8d66f21dfc85443e92c56edR146.
There is no functional difference from removing the if
-- it is a purely style issue to not nest conditionals inside of pattern matches. In particularly, it removes nesting (good) and makes it easier for compiler analysis to compile the pattern match (a sequence/tree of conditionals) efficiently.
Ah I see. Thank you.
Hi, hope this looks okay. Particularly the tests....