From 8b07b9296dac108d7a3d44db227bb1c6042db555 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Mon, 21 Aug 2017 23:49:20 +0200 Subject: Adding function to be typically used to pass values from an OCaml "when" clause. --- lib/util.mli | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/util.mli') diff --git a/lib/util.mli b/lib/util.mli index d910e7e28..c54f5825c 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -137,3 +137,8 @@ val sym : ('a, 'b) eq -> ('b, 'a) eq val open_utf8_file_in : string -> in_channel (** Open an utf-8 encoded file and skip the byte-order mark if any. *) + +val set_temporary_memory : unit -> ('a -> 'a) * (unit -> 'a) +(** A trick which can typically be used to store on the fly the + computation of values in the "when" clause of a "match" then + retrieve the evaluated result in the r.h.s of the clause *) -- cgit v1.2.3