Skip to content

ex1 05

← Back

Basic Info

Functional Programming
└── Lab ML
    └── 0​314
        └── ex1 05.sml

Preview

(*
Write a function that takes a list of characters and returns true if the first element is a vowel
*)

fun vowel(#"a"::ys) = true
    | vowel(#"e"::ys) = true
    | vowel(#"i"::ys) = true
    | vowel(#"o"::ys) = true
    | vowel(#"u"::ys) = true
    | vowel(_) = false;