Last active
December 6, 2017 01:30
-
-
Save shanecharles/55831582aca41430a019c4d1c6060951 to your computer and use it in GitHub Desktop.
Initial ring generation for advent of code 2017 day 3 part 1.
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
let rings = | |
seq { | |
yield (0,1) | |
yield! Seq.unfold | |
(fun (i, previous) -> | |
let ringId = i + 1 | |
let m = (ringId, (ringId * 2 * 4) + previous) | |
Some (m,m)) (0,1) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment