News for hackers. Stuff that matters.
Re:Introduction to Functional Programming in OCaml by anuragsoni on Thursday August 23, 2018 @11:27AM (#17828031)
This tripped me up when I was first exploring OCaml. FWIW i've taken to wrapping the nested matches with parenthesis or a begin/end

    match foo with
      | X -> (match bar with
               | Y -> 1
               | Z -> 2)
      | W -> 3

    match foo with
      | X -> begin match bar with
               | Y -> 1
               | Z -> 2
             end
      | W -> 3

There are no comments on this comment yet.