rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/reasonml

13 lines
398 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
/* I like a teacher who gives you something to take
home to think about besides homework. */
let gpa_score = 5.0;
type schoolPerson = Teacher | Director | Student(string);
let greeting = person =>
switch (person) {
| Teacher => "Hey Professor!"
| Director => "Hello Director."
| Student("Richard") => "Still here Ricky?"
| Student(anyOtherName) => "Hey, " ++ anyOtherName ++ "."
};