From 7366d2fe7b18ad4425ae807b5a7b8cc8a25449c2 Mon Sep 17 00:00:00 2001 From: Aleksandar Milicevic Date: Fri, 7 Oct 2011 19:39:07 -0400 Subject: Jennisys: Implemented some support for mutator methods by keeping track of the pre state --- Jennisys/Utils.fs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Jennisys/Utils.fs') diff --git a/Jennisys/Utils.fs b/Jennisys/Utils.fs index dcb13f08..e39464f1 100644 --- a/Jennisys/Utils.fs +++ b/Jennisys/Utils.fs @@ -19,6 +19,14 @@ let BoolToOption b = else None +// ===================================== +/// ensures: ret = (opt == Some(_)) +// ===================================== +let OptionToBool opt = + match opt with + | Some(_) -> true + | None -> false + // ===================================== /// ensures: ret = (opt == Some(_)) // ===================================== -- cgit v1.2.3