Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Answer accordingly and label which one you answer with a number. Suppose that yo

ID: 669872 • Letter: A

Question

Answer accordingly and label which one you answer with a number.

Suppose that you want to use a list data structure to implement a Set data type. Write insert and member operations in Scheme; ML; Haskell. Make sure that in ML and Haskell your Set data type is distinct from a list, In Haskell, define your Set type to be an instance of classes Eq and Show. Given the definition of a binary search tree in Haskell as given in the text: data BST a = Nil | Node a (BST a) (BST a) write a show function (show: : (BST a) -> string) as it would be generated by a Haskell deriving Show clause.

Explanation / Answer

sorry but i just can help you with the first question /:

3.9)

THIS IS FOR A NEW LIST

(define (append! lst . lsts)
(if (not (null? lsts))
(if (null? (cdr lst))
(begin
(set-cdr! lst (car lsts))
(apply append! (car lsts) (cdr lsts)))

(apply append! (cdr lst) lsts))))

If you want add more elements to a list

MEMBER

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote