Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions code/classes/class_types_stack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ end
module AbstractStack : sig
type 'a t = < pop: 'a option; push: 'a -> unit >

val make : unit -> 'a t
val make : 'a list -> 'a t
end = Stack

(* part 2 *)
module VisibleStack : sig

type 'a t = < pop: 'a option; push: 'a -> unit >

class ['a] stack : object
class ['a] stack : 'a list -> object
val mutable v : 'a list
method pop : 'a option
method push : 'a -> unit
end

val make : unit -> 'a t
val make : 'a list -> 'a t
end = Stack