Define function numBs(s) that produces the number of b's in string s. For example, numBs("bob") = 2. Only count lower case b's.

(Hint. (1) An empty string has no b's in it. (2) A string that begins with a b has one more b than its tail. (3) A string that does not begin with a b has the same number of b's as its tail.

 

    [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.)