Created
November 16, 2017 17:30
-
-
Save creichert/11d9db86368427225cd300260312fd74 to your computer and use it in GitHub Desktop.
Find number in a list that occurs an odd number of times
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.List | |
import Data.Bits | |
-- > 1 | |
main = print $ foldl xor 0 [1,1,2,2,3,3,4,4,5,5,6,6,7,7,1] |
Author
creichert
commented
Nov 16, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment