Skip to content

Instantly share code, notes, and snippets.

@Zekt
Created April 27, 2018 21:24
Show Gist options
  • Save Zekt/7eaefa0f142b20569664a8460fd5da81 to your computer and use it in GitHub Desktop.
Save Zekt/7eaefa0f142b20569664a8460fd5da81 to your computer and use it in GitHub Desktop.
Wow, Such nub
import Data.List
nub xs = map fst . filter (uncurry notElem) $ zip xs (inits xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment