Created
December 4, 2016 22:44
-
-
Save theburningmonk/3a1e313cf559fbf5443e2ae55fdbcb8c to your computer and use it in GitHub Desktop.
Advent of Code (Day 3)
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
#load "Day03.fs" | |
open Day03 | |
let numRows = input.Length | |
{ 0..numRows-1 } | |
|> Seq.chunkBySize 3 | |
|> Seq.collect (fun rows -> | |
{ 0..2 } | |
|> Seq.map (fun col -> | |
rows |> Array.map (fun row -> input.[row].[col]))) | |
|> Seq.filter isTriangle | |
|> Seq.length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment