Created
December 22, 2017 22:36
-
-
Save krzysu/f9f737b17a31a7d0565e9df6d9c983ab to your computer and use it in GitHub Desktop.
double for-loop in elm ;)
This file contains hidden or 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
getAllCoordinates : Int -> List ( Int, Int ) | |
getAllCoordinates size = | |
let | |
lengthAsArray = | |
List.range 0 (size - 1) | |
in | |
lengthAsArray | |
|> List.concatMap | |
(\x -> | |
List.map | |
(\y -> ( x, y )) | |
lengthAsArray | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment