Last active
September 27, 2016 17:45
-
-
Save orclev/39afeb06df13d81ac482d31501ec23fc to your computer and use it in GitHub Desktop.
Haskell implementation of the C++ provided at https://medium.com/@nirjhor/functional-programming-in-c-8bdbd903ee32#.ehikr76vp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Set (fromList, intersection, size) | |
import Data.List (foldl1, map) | |
process :: String -> String | |
process = show . size . foldl1 intersection . map fromList . lines | |
main :: IO () | |
main = interact process |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment