Question: use scheme and the 8 functions to complete the two functions below of draw star function. The paste one is to paste figurea on the

use scheme and the 8 functions to complete the two functions below of draw star function.

The paste one is to paste figurea on the figureb like it will give the image if we put one image upon another,.

the second one is to replace all characters in a figure with a #\space character.

use scheme and the 8 functions to complete the two functions belowof draw star function. The paste one is to paste figurea on

1. (define (make-figure funs numrows numcols) (list (add-check func numrows numcols) numrows numcols)) (define (figure-func figure) (car figure)) (define (figure-numrows figure cadr figure)) (define (figure-numcols figure cadde figure)) 2 (define (forn start stop func) (if > start stop) 'O (let ((first-value (funs start))) (cons first-value (forn (+ 1 start) stop funs))))) 3. (define (range-check row numrows col numcols) (not (or (=row numrows) (>= col numcols)))) 4. (define (add-check funs numrows numcols) (lambdarow col) (if (range-check row numrows col numcols) (func row col) #1.))) 5. (define (display-window start-row stop-row start-col stop-col figure) (forn start-row stop-row (lambda (1) (forn start-col stop-col (lambda (c) (display ((figure-funs figure) rc)))) (newline) (newline)) 6. (define (charfig char) (make-figure (lambda (row col) char)1 1)) 7. (define (sw-corner size) (make-figure (lambda (row col) (if (>= row col) #* #space) size size)) 8. (define (repeat-cols piepeat figure) (make-figure (lambda (row col) ((figure-func figure) row (modulo col (figure-numcols figure)))) (figure-numrows figure) (* niepeat (figure-numcols figure)) the function just calls the function that repeat-cols received, but uses modulo to select the right position. )) ;;; paste draws the composition of two figures ii; any coordinate in range of either figure should draw, and a space should appear only if that is the case for both figures (define (paste figurea figureb) (make-figure (lambda (row col) ((figure-func figure) (figure-func figure)))) iii excludewindow excludes some segment of a figure, replacing any character ii; within the figure's normal draw area that is in the exclusion zone with a '#\space' character ;;; the exclusion window is rectangular only (define (excludeWindow minrow maxrow mincol maxcol figure ) ( ) ;; replace this line with code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!