Write a definition of function isPrefix(s, t), which produces true if string s is a prefix of string t. For example, isPrefix("rab", "rabbit") should be true. According to our definition, a string is considered to be a prefix of itself. So isPrefix("rabbit", "rabbit") should also be true.

(Hint: Just get a substring from the beginning of t that has the same length as s, and see if it is equal to s. Use _*.)

 

    [Language: Cinnameg  Kind: function definition*]

(*You can define more than one function if you put a semicolon between definitions (but not between cases of one definition). Be sure to define a function before you use it.)