Last active
December 21, 2015 10:09
-
-
Save mxswd/6290258 to your computer and use it in GitHub Desktop.
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
main = do | |
let xs = [0..1024] | |
print $ foldl (\x y -> length y + x) 0 $ lsubs xs | |
lsubs [] = [] | |
lsubs (x:xs) = (foldr (\y ys -> (x, y) : ys) [] xs) : lsubs xs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment