Last active
June 25, 2018 14:56
-
-
Save kennetpostigo/3cb15b6e5702c3fcd50454b94d7b065d to your computer and use it in GitHub Desktop.
Reason BST Blog Post types
This file contains hidden or 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
/* waddup annotated as a string */ | |
let waddup: string = "waddup fam?!?!"; | |
/* greeting annotated as a function that takes a string and returns string */ | |
let greeting: string => string = name => "Hey " ++ name ++ "!"; | |
/* Type constructor for a function that takes a string and returns unit */ | |
type nonPureGreeting = string => unit; | |
/* printGreet annotated as nonPureGreeting*/ | |
let printGreet: nonPureGreeting = name => print_string(greet(name)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment