12 lines
216 B
OCaml
12 lines
216 B
OCaml
module Stateful () : sig
|
|
val log : string -> unit
|
|
val get : unit -> string
|
|
end = struct
|
|
|
|
let logger = ref ""
|
|
let log : string -> unit =
|
|
fun s -> logger := !logger ^ s
|
|
let get () : string = !logger
|
|
|
|
end
|