Skip to content

Instantly share code, notes, and snippets.

@dullbananas
Created February 28, 2021 20:35
Show Gist options
  • Save dullbananas/56cd4a282973c0679ce36af40af6a719 to your computer and use it in GitHub Desktop.
Save dullbananas/56cd4a282973c0679ce36af40af6a719 to your computer and use it in GitHub Desktop.
Impure function in Elm
random : Value -> Float
random =
decodeValue (field "random" float)
let object = {
get random() {
return Math.random();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment