Skip to content

Instantly share code, notes, and snippets.

@CarstenKoenig
Last active August 29, 2015 14:05
Show Gist options
  • Save CarstenKoenig/a50e040a6913d5a1113c to your computer and use it in GitHub Desktop.
Save CarstenKoenig/a50e040a6913d5a1113c to your computer and use it in GitHub Desktop.
diag indizes
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