Add a DPI calculator to help to find the correct image resolution.
[master-thesis.git] / Parasitemia / ParasitemiaCore / Types.fs
index 8f6c34a..5440115 100644 (file)
@@ -86,4 +86,18 @@ type MaybeBuilder () =
     member this.Return (x) =
         Some x
 
-let maybe = MaybeBuilder()
\ No newline at end of file
+let maybe = MaybeBuilder()
+
+type Result<'a> =
+    | Success of 'a
+    | Fail of string // Error message.
+
+type ResultBuilder () =
+    member this.Bind (res, f) =
+        match res with
+        | Success value -> f value
+        | fail -> fail
+
+    member this.ReturnFrom (x) = x
+
+let result = ResultBuilder()
\ No newline at end of file