On Thu, Feb 9, 2017 at 1:57 AM, Jeremy Yallop <yallop@gmail.com> wrote:
>
> let state_of_value v = match v with
>   | `Red  | `Blue  | `Green -> ?????
>   | `Missing -> Missing

  let state_of_value v = match v with
    | (`Red  | `Blue  | `Green) as c -> Color (color_index c)
    | `Missing -> Missing

perfect, thanks!

martin