0
私はリスト内の重複を削除して新しいリストを返すremove_duplicates関数を持っています。スキームを使用して関数から返された値を別の関数の変数に代入する
(define (remove_duplicate list)
(cond
((null? list) '())
;member? returns #t if the element is in the list and #f otherwise
((member? (car list) (cdr list)) (remove_duplicate(cdr list)))
(else (cons (car list) (remove_duplicate (cdr list))))
))
この関数呼び出しの戻り値を別の関数fの変数に割り当てたいとします。
(define (f list)
;I have tried this syntax and various other things without getting the results I would like
(let* (list) (remove_duplicates list))
)
ご協力いただきありがとうございます。