summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.7.0/lib/rouge/demos/reasonml
blob: db29f2cce550218fdadbbe74a9a02a838d852853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* 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 ++ "."
  };