Skip to content

Instantly share code, notes, and snippets.

@theburningmonk
Created December 4, 2016 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theburningmonk/3a1e313cf559fbf5443e2ae55fdbcb8c to your computer and use it in GitHub Desktop.
Save theburningmonk/3a1e313cf559fbf5443e2ae55fdbcb8c to your computer and use it in GitHub Desktop.
Advent of Code (Day 3)
#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