Write a definition of a function isSubtring(s, t) that produces true if s is a substring of t. So isSubstring("zoo", "zoology") = true, but isSubstring("ogy", "zoology") = false.
(Hint. Use recursion. Here are some ideas.
If s is a prefix of t, then isSubstring(s, t) is true. For example, isSubstring("zoo", "zoology") is true.
Otherwise, if t is an empty string, then s must not be a substring of t. For example, isSubstring("zoo", "") is false.
Otherwise, s is a substring of t precisely when s is a substring of the tail of t. For example, isSubstring("bit", "rabbit") = isSubstring("bit", "abbit").
Note. You will want to use isPrefix. Just write the definition of isSubstring. For this problem, the definition of isPrefix is automatically supplied for you.