Question
8888888888888888888888Write the Code In Racket and Racket ONLY!!88888888888888888888888888 Write a recursive Racket function remove-char that takes two string parameters, s and c, and evaluates to
8888888888888888888888Write the Code In Racket and Racket ONLY!!88888888888888888888888888
Write a recursive Racket function "remove-char" that takes two string parameters, s and c, and evaluates to string s with all occurrences of c removed. The string c is guaranteed to be a length-1 string; in other words a single character string. For example (remove-char "abc" "b") should evaluate to "ac".
Here is pseudocode that you could implement:
if s is empty return s else if (c = first char of s) return remove-char(all but first char of s) else return first char of s concatenated with remove-char(all but first char of s)
8888888888888888888888Write the Code In Racket and Racket ONLY!!88888888888888888888888888
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started