Question: Scheme Code: Write a pattern matcher that will use the following special characters and pattern matching techniques. The code should produce the output displayed below.
Scheme Code: Write a pattern matcher that will use the following special characters and pattern matching techniques. The code should produce the output displayed below.
the exact word:
(match? (please) (please))
true
(match? (please) (pretty please))
false
! exactly one word:
(match? (! ! me) (please please me))
true
(match? (! ! me) (please me))
false
? at most one word:
(match? (? me) (please please me))
false
(match? (? ? me) (please me))
true
* any number of words:
(match? (* me) (please please me))
true
(match? (*) (please me))
true
(match? (* me *) (please please me))
true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
