Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fill in the scheme code with the given instructions where it says ;;replace this line. ;;; repeat-cols returns a figure made up of nrepeat copies
Fill in the scheme code with the given instructions where it says ;;replace this line. ;;; repeat-cols returns a figure made up of nrepeat copies of ;;; figure, appended horizontally (left and right of each other) (define (repeat-cols nrepeat figure) (make-figure (lambda (row col) ((figure-func figure) row (modulo col (figure-numcols figure)))) (figure-numrows figure) (* nrepeat (figure-numcols figure)) ;; the function just calls the function that repeat-cols received, but ;; uses modulo to select the right position. )) ;;; repeat-rows returns a figure made up of nrepeat copies ;;; of a figure, appended vertically (above and below each other) (define (repeat-rows nrepeat figure) ' ( ) ;; replace this line ) ;;; append cols returns the figure made by appending figureb to the ;;; right of figurea the number of rows in the resulting figure is the ;;; smaller of the number of rows in figurea and figureb (define (append-cols figurea figureb) '( ) ;; replace this line ) ;;; append-rows returns the figure made by appending figureb below figurea ;;; the number of columns in the resulting figure is the smaller of the number of columns in figurea ;;; and figternb (define (append-rows figurea figureb) '( );; replace this line ) ;;; flip-cols returns a figure that is the left-right mirror image of figure (define (flip-cols figure) '( ) ;;replace this line ) ;;; flip-rows returns a figure that is the up-down mirror image of figure (define (flip-rows figure) '( ) ;; replace this line )
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