cloud.ml 413 Bytes
Newer Older
POTTIER Francois's avatar
POTTIER Francois committed
1 2 3 4 5
class ['self] base = object (_ : 'self)
  method visit_real _env x = x
end

type cloud =
POTTIER Francois's avatar
POTTIER Francois committed
6 7 8 9 10 11 12 13 14
  | Point of (float[@name "real"]) * (float[@name "real"])
  | Clouds of cloud list
  [@@name "nuage"]
  [@@deriving visitors { variety = "map"; ancestors = ["base"] }]

type 'a mylist = 'a list =
  | []                     [@name "nil"]
  | (::) of 'a * 'a mylist [@name "cons"]
  [@@deriving visitors { variety = "map" }]