Last active
March 7, 2016 17:47
-
-
Save lheckemann/bb40cf1bf1cd90d20b4a 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
public static Stream<Coordinate> all() { | |
return IntStream.range(0, WIDTH*HEIGHT).mapToObj(i -> new Coordinate(i%WIDTH, i/WIDTH)); | |
} |
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
def all(): | |
yield from ((i%WIDTH, i//WIDTH) for i in range(WIDTH*HEIGHT)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment