Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created July 28, 2014 07:07
Show Gist options
  • Save mwotton/39caaa26448afe5083e3 to your computer and use it in GitHub Desktop.
Save mwotton/39caaa26448afe5083e3 to your computer and use it in GitHub Desktop.
orb ➜ ~ cat mb.hs
import Data.Set
loseDupes :: [Int] -> [Int]
loseDupes = toList . fromList
main = getContents >>= print . loseDupes . read
orb ➜ ~ ghcjs mb.hs
Linking mb.jsexe (Main)
orb ➜ ~ echo '[1,2,22,2,2,3]' | node mb.jsexe/all.js
0
[1,2,3,22]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment