Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
