Skip to content

Instantly share code, notes, and snippets.

@osfameron
Created March 26, 2009 12:52
Show Gist options
  • Save osfameron/86072 to your computer and use it in GitHub Desktop.
Save osfameron/86072 to your computer and use it in GitHub Desktop.
uniq = join . snd . mapAccumL f S.empty
where f s e | e `S.member` s = (s, [])
| otherwise = (e `S.insert` s, [e])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment