Skip to content

Instantly share code, notes, and snippets.

@offby1
Created October 31, 2009 05:16
Show Gist options
  • Select an option

  • Save offby1/222923 to your computer and use it in GitHub Desktop.

Select an option

Save offby1/222923 to your computer and use it in GitHub Desktop.
(define (uniq seq)
(for/fold ([result '()])
([item seq])
(cond
((null? result)
(cons item result))
((equal? item (car result))
result)
(else
(cons item result)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment