15
So, I'm totally new to OCaml and am moving pretty slowly in getting my first functions implemented. One thing I'm having trouble understanding is when to use pattern matching abilities like
let foo =
[] -> true
| _ -> false;;
vs using the if else structure like
let foo a =
if a = [] then true else false;;
When should I use each?