如何摆脱连续重复的元素?

时间:2019-12-03 23:01:07

标签: scheme racket

我是编码的新手,我试图删除字符串列表中的连续重复元素,但我对下一步的工作有些迷茫

(check-expect (remove-dupl (list "1" "1" "2" "3" "3" "3" "1" "2" "2" 
(list "1" "2" "3" "1" "2"))))
(define (remove-dupl los)
  (cond [(empty?) empty]
        [(??) los]))

0 个答案:

没有答案