Anonymous user
History variables: Difference between revisions
→{{header|OCaml}}
Line 986:
=={{header|OCaml}}==
The easiest solution is to use the Stack module coming with OCaml's standard library:
<lang ocaml>
module History =▼
(* This is only for convenience when typing code *)
let show_entry e =
▲ List.iter (fun v -> Printf.printf "History entry: %5d\n" v) hv.hve
▲open History
let () =
let
H.push
H.push
H.push
H.
hs |> H.pop
hs |> H.pop
hs |> H.pop
</lang>
|