Problem 1 Following Function Design May Errors Please Fix Error Errors Find Changes Make Q43863231
(@problem 1)
;;
;; The following function design may have errors in it. Please fixthe error
;; or errors that you find. Any changes you make should preservethe existing
;; design intent.
;;
;; First uncomment the entire function design, and then fix theerror.
;; If you are unable to find and fix the error, leave it commentedout.
;;
;; Your solution must include @htdf, @signature, and @templatetags.
;(@htdf stack)
;(@signature Image Image -> Image)
;;; stack images, widest on bottom, first on bottom if samewidth
;(check-expect (stack (rectangle 10 5 “solid” “blue”)
; (rectangle 20 9 “solid” “red”))
; (above (rectangle 10 5 “solid” “blue”)
; (rectangle 20 9 “solid” “red”)))
;(check-expect (stack (rectangle 20 5 “solid” “blue”)
; (rectangle 20 9 “solid” “red”))
; (above (rectangle 20 9 “solid” “red”)
; (rectangle 20 5 “solid” “blue”)))
;(check-expect (stack (rectangle 20 5 “solid” “blue”)
; (rectangle 10 9 “solid” “red”))
; (above (rectangle 10 9 “solid” “red”)
; (rectangle 20 5 “solid” “red”)))
;
;;(define (stack i1 i2) i1) ;stub
;
;(@template Image)
;
;(define (stack i1 i2)
; (if (> image-width i1 image-width i2)
; (above i2 i1)
; (above i1 i2)))
Expert Answer
Answer to (@problem 1) ;; ;; The following function design may have errors in it. Please fix the error ;; or errors that you find….
OR