Day13
Copyright(c) Eric Mertens 2021
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2021/day/13

Given a paper with some dots and a series of fold instructions we fold and fold and fold and find our secret code.

Synopsis

Documentation

data A Source #

Constructors

Ax 
Ay 

main :: IO () Source #

>>> :main
716
███  ███   ██  █  █ ████ ███  █    ███
█  █ █  █ █  █ █ █  █    █  █ █    █  █
█  █ █  █ █    ██   ███  ███  █    █  █
███  ███  █    █ █  █    █  █ █    ███
█ █  █    █  █ █ █  █    █  █ █    █ █
█  █ █     ██  █  █ █    ███  ████ █  █

foldPoints Source #

Arguments

:: (A, Int)

fold line

-> Set Coord 
-> Set Coord 

2-dimensional fold the set of points over a line.

fold1 Source #

Arguments

:: Int

fold

-> Int

point

-> Int 

1-dimensional fold updating one point