Created
December 10, 2019 09:02
-
-
Save sparksp/fccd331988360cac56a990eacf4ac378 to your computer and use it in GitHub Desktop.
Comparison of Elm vs F#
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
module Option exposing (getOr) | |
getOr : a -> Maybe a -> a | |
getOr x val = | |
case val of | |
Just v -> | |
v | |
Nothing -> | |
x |
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
module Option = | |
let getOr x = function | Some v -> v | None -> x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment