For the record, this is part of a homework assignment, but I have already implemented a solution. I am simply wondering if there is a better way to do it.Background: I am asked to write a procedure, (complete ls), that takes a list of elements and creates a fully connected graph from them, i.e. complete. I am able to write helper functions to assist in my solution.A sample graph is defined as '((a (b c)) (b (a c))). Where the car of each sub-list is a vertex and the cdr of each sub-list is a list of vertices that vertex is connected to.For example:(complete? '((a (b c)) (b (a c)) (c (a b)))) => #t(complete? '((a (b)) (b (a c)) (c ()))) => #fMy working solution:(define (complete ls)    (helpComplete ls ls))(define (helpComplete origLst ls)  (if (null? ls)    '()    (cons      (list        (car ls)        (remove-first (car ls) origLst))      (helpComplete origLst (cdr ls)))))(define (remove-first element ls)  (cond    [(null? ls) '()]    [(eqv? element (car ls)) (cdr ls)]    [else (cons (car ls) (remove-first element (cdr ls)))]  ))I am not allowed to change the inputs for the complete procedure, as our grading server is expecting it to look like it is now. I am also not allowed to use and ! procedures. We are running Petite Chez Scheme Version 8, if anyone cares.The above code does work, but I was wondering if there is a better way to do it?
Completing a Graph in Scheme
recursion;scheme;graph