Menu

[Solved]Write Scheme Functions Following Operations 1 Found E Ist Returns T Ife Element List Lst O Q37301054

Programming Languages Question:

I just need 4 & 5 answered, ignore 1,2,3.

Write your own Scheme functions for the following operations: 1. (found e Ist) that returns #t ife is an element of the list

Write your own Scheme functions for the following operations: 1. (found e Ist) that returns #t ife is an element of the list lst. Otherwise, return if 2. (set? 1st) that returns #tif the list 1st is a set (contains all different elements); (use/ound) 3. (square? n) that returns #tif n is a square (eg. 0 1 4 9 16 ). Otherwise, return #f 4. (countsquares 1st) that counts the number of elements of the list lst that are squares (e.g. (countsquares (1 2 3 4)) should return 2) (allsquares? lst) that returns #tif all elements of the list lst are squares. Otherwise, return #f. (defihe founse Ist) 5. 4. C 얘 1 egual ? (ca, e) (car lst)) (foume chr lt 1)) #6 ) Show transcribed image text Write your own Scheme functions for the following operations: 1. (found e Ist) that returns #t ife is an element of the list lst. Otherwise, return if 2. (set? 1st) that returns #tif the list 1st is a set (contains all different elements); (use/ound) 3. (square? n) that returns #tif n is a square (eg. 0 1 4 9 16 ). Otherwise, return #f 4. (countsquares 1st) that counts the number of elements of the list lst that are squares (e.g. (countsquares (1 2 3 4)) should return 2) (allsquares? lst) that returns #tif all elements of the list lst are squares. Otherwise, return #f. (defihe founse Ist) 5. 4. C 얘 1 egual ? (ca, e) (car lst)) (foume chr lt 1)) #6 )

Expert Answer


Answer to Write your own Scheme functions for the following operations: 1. (found e Ist) that returns #t ife is an element of the … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *