Skip to content

Instantly share code, notes, and snippets.

@duairc
Created October 17, 2009 22:24
Show Gist options
  • Save duairc/212476 to your computer and use it in GitHub Desktop.
Save duairc/212476 to your computer and use it in GitHub Desktop.
tr = (^2) . ((-)1) . (2*)
tl n = tr n - 2 * (n - 1)
br n = tr n - 4 * (n - 1)
bl n = tr n - 6 * (n - 1)
putStrLn $ show $ (+1) $ sum $ map (\f -> sum $ map f [2..501]) [tr, tl, br, bl]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment