module Result =
struct
type ('a, 'b) t = Ok of 'a | Error of 'b
end
open Result
type 'a t
= { contents
: int list }
include
(struct
let no_siblings_of_t t =
match t.contents with
| [_] -> Ok (t : [< `No_siblings | `Has_siblings] t :> [`No_siblings] t)
| _ -> Error `Has_siblings
end : sig
val no_siblings_of_t : [< `No_siblings | `Has_siblings] t -> ([ `No_siblings ] t, [> `Has_siblings ]) Result.t
end)
bW9kdWxlIFJlc3VsdCA9CnN0cnVjdAogIHR5cGUgKCdhLCAnYikgdCA9IE9rIG9mICdhIHwgRXJyb3Igb2YgJ2IKZW5kCgpvcGVuIFJlc3VsdAoKdHlwZSAnYSB0ID0geyBjb250ZW50cyA6IGludCBsaXN0IH0KCmluY2x1ZGUKICAoc3RydWN0CiAgICAgbGV0IG5vX3NpYmxpbmdzX29mX3QgdCA9CiAgICAgICBtYXRjaCB0LmNvbnRlbnRzIHdpdGgKICAgICAgICAgfCBbX10gLT4gT2sgKHQgOiBbPCBgTm9fc2libGluZ3MgfCBgSGFzX3NpYmxpbmdzXSB0IDo+IFtgTm9fc2libGluZ3NdIHQpCiAgICAgICAgIHwgXyAgIC0+IEVycm9yIGBIYXNfc2libGluZ3MKICAgZW5kIDogc2lnCiAgICAgdmFsIG5vX3NpYmxpbmdzX29mX3QgOiBbPCBgTm9fc2libGluZ3MgfCBgSGFzX3NpYmxpbmdzXSB0IC0+IChbIGBOb19zaWJsaW5ncyBdIHQsIFs+IGBIYXNfc2libGluZ3MgXSkgUmVzdWx0LnQKICAgZW5kKQo=