Let's say I define a type in OCaml this way:
type 'a foo = My_none | Bar of 'a;;
When making
let a = Bar 4;;
The Bar constructor is "called".
In the following function, does the matching call the constructor, or simply "recognize" the pattern without calling the constructor?
let get_bar x = match x with
| My_none -> failwith "None"
| Bar z -> z;;