Skip to content

Instantly share code, notes, and snippets.

@struktured
Created February 24, 2015 04:55
Show Gist options
  • Save struktured/982d1c63df65f8168285 to your computer and use it in GitHub Desktop.
Save struktured/982d1c63df65f8168285 to your computer and use it in GitHub Desktop.
class virtual abox rc = object(self)
val mutable children = []
end;;
class virtual abox : 'a -> object val mutable children : 'b list end
class vbox = object(self)
inherit abox "vbox" end;;
class vbox : object val mutable children : 'a list end
class polling_box =
object
inherit vbox
method replace_children () =
children <- [] end;;
class polling_box : object val mutable children : 'a list method replace_children : unit -> unit end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment