Last active
September 13, 2019 22:24
-
-
Save sean-clayton/141c297b260ec755bc5305fcfbead1f0 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
type maybeString = string option | |
let myMaybeString: maybeString = Some "howdy" | |
let myString = | |
match myMaybeString with | |
| Some s -> s | |
| None -> "" |
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
type maybeString = option(string); | |
let myMaybeString: maybeString = Some("howdy"); | |
switch (myMaybeString) { | |
| Some(s) => s; | |
| None => "" | |
} |
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
var myMaybeString = "howdy"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment