1
2
3
let is_vowel c = match c with 
  'a' | 'e' | 'i' | 'o' | 'u' -> true 
| _ -> false ;; 

<

function is_vowel(c){
  switch(c){
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u':
      return true;
    default: 
      return false;
  }
}

this form is way better

Edit
Pub: 10 Jul 2021 20:17 UTC
Views: 117