Created
March 24, 2023 15:31
-
-
Save p1xelHer0/b92a3741a8c6e25ed4acdb480ea89d01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let example a = match a with 1 | 2 | 3 -> Ok a | _ -> Error "ohno" | |
let test = | |
(* this only works cuz of >>=, |> woudln't work here: | |
we would end up with a | |
`a result result result result` | |
instead of a | |
`a result`*) | |
1 |> example >>= example >>= example >>= example | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment