Skip to content

Instantly share code, notes, and snippets.

@mxswd
Last active December 21, 2015 10:09
Show Gist options
  • Save mxswd/6290258 to your computer and use it in GitHub Desktop.
Save mxswd/6290258 to your computer and use it in GitHub Desktop.
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