Skip to content

Instantly share code, notes, and snippets.

@gigawhitlocks
Created July 9, 2013 19:00
Show Gist options
  • Save gigawhitlocks/5960206 to your computer and use it in GitHub Desktop.
Save gigawhitlocks/5960206 to your computer and use it in GitHub Desktop.
show2d [x] = show x
show2d (x:xs) = show x ++ "\n" ++ show2d xs
multiples :: Integer -> [[Integer]]
multiples x = filter ((1 /=).(length)) $
map (\y->filter ((0 ==).(`mod` y)) [1 .. x]) [1..x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment