Last active
August 29, 2015 14:05
-
-
Save CarstenKoenig/a50e040a6913d5a1113c to your computer and use it in GitHub Desktop.
diag indizes
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
diagInd :: [(Integer, Integer)] | |
diagInd = iterate f (1,1) | |
where f (lx,ly) | |
| ly == 1 = (1, lx+1) | |
| otherwise = (lx+1, ly-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment