Created
January 14, 2017 06:15
-
-
Save ryuta-ito/b3d3bbcff5a4c72b7d05bc82c90b5634 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
-- N^2 ~ N | |
f (x, y) = (((x+y)*(x+y+1))/2) + x + 1 | |
a n = b (0, n) | |
b (x, 0) = [(x, 0)] | |
b (x, y) = (x, y) : b (x+1, y-1) | |
app n = map f ([0..n] >>= a) |
Author
ryuta-ito
commented
Jan 14, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment