diff options
-rw-r--r-- | fstar/Primitives.fst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fstar/Primitives.fst b/fstar/Primitives.fst index dae73f46..6b1ec539 100644 --- a/fstar/Primitives.fst +++ b/fstar/Primitives.fst @@ -9,7 +9,9 @@ type result (a : Type0) : Type0 = | Return : a -> result a | Fail : result a -// Monadic bind and return (allows us to use the monadic notations like `y <-- f x;` +// Monadic bind and return. +// Re-definining those allows us to customize the result of the monadic notations +// like: `y <-- f x;` let return (#a : Type0) (x:a) : result a = Return x let bind (#a #b : Type0) (m : result a) (f : a -> result b) : result b = match m with |