fork download
  1. type int_unit = Int of int | Unit of unit;;
  2. type str_float = String of string | Float of float;;
  3. type everything = Int_Unit of int_unit | Str_Float of str_float;;
  4.  
  5. let f = function
  6. | Int_Unit Int _ -> "int"
  7. | Int_Unit Unit _ -> "unit"
  8. | Str_Float Float _ -> "float"
  9. | Str_Float String _ -> "string"
Success #stdin #stdout 0.01s 2736KB
stdin
Standard input is empty
stdout
Standard output is empty