Check for Mistakes in this Word Problem: equal-length?
Directions: Write a function that takes in two strings and returns true if their lengths are equal and false otherwise.
Contract and Purpose Statement
Every contract has three parts ...
equal-length?:string stringboolean
Given two strings, check if they are the same length
Write some examples, then circle and label what changes ...
equal-length?("yes" "no"))(= (string-length "yes") (string-length "no"))
equal-length?("dog" "cat"))(= (string-length "dog") (string-length "cat"))
Write the definition, giving variable names to all your input values ...
(define (
equal-length?string1 string2)(= string1 string2))