-<p><link rel="stylesheet" href="modest.css"></link></p>
-<h1 id="advent-of-code-2016">Advent of Code 2016</h1>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta name="generator" content="pandoc" />
+ <title>Advent of Code 2016</title>
+ <style type="text/css">code{white-space: pre;}</style>
+ <link rel="stylesheet" href="modest.css" type="text/css" />
+</head>
+<body>
+<div id="header">
+<h1 class="title">Advent of Code 2016</h1>
+</div>
<p>Code to solve the <a href="http://adventofcode.com/2016/">Advent of Code</a> puzzles. This year, I'm trying to use the puzzles as a prompt to learn <a href="https://wiki.haskell.org/Haskell">Haskell</a>.</p>
<p><a href="http://learnyouahaskell.com/chapters">Learn you a Haskell</a>, <a href="https://www.haskell.org/tutorial/index.html">Introduction to Haskell 98</a>, and <a href="https://hackage.haskell.org/">Hackage</a> are good resources.</p>
<p>I'm using the basic Haskell Platform installation (install with</p>
<pre><code>$ sudo aptitude install haskell-platform</code></pre>
<p>).</p>
<p>Compile the code with</p>
-<pre><code>ghc -o advent01 advent01.hs</code></pre>
+<pre><code>ghc --make advent01.hs</code></pre>
<p>then run it as</p>
<pre><code>advent01</code></pre>
+<p>Build this readme file wth</p>
+<pre><code>pandoc -s README.md > README.html</code></pre>
<p>(Using the <a href="https://github.com/markdowncss/modest">Modest styles</a>.)</p>
+</body>
+</html>
---
title: "Advent of Code 2016"
-output:
- html_document:
- css: modest.css
+output: html_document
+css: modest.css
---
-<link rel="stylesheet" href="modest.css"></link>
-
-# Advent of Code 2016
-
Code to solve the [Advent of Code](http://adventofcode.com/2016/) puzzles. This year, I'm trying to use the puzzles as a prompt to learn [Haskell](https://wiki.haskell.org/Haskell).
[Learn you a Haskell](http://learnyouahaskell.com/chapters), [Introduction to Haskell 98](https://www.haskell.org/tutorial/index.html), and [Hackage](https://hackage.haskell.org/) are good resources.
Compile the code with
```
-ghc -o advent01 advent01.hs
+ghc --make advent01.hs
```
then run it as
advent01
```
+Build this readme file wth
+```
+pandoc -s README.md > README.html
+```
+
(Using the [Modest styles](https://github.com/markdowncss/modest).)
\ No newline at end of file
+module Main(main) where
+
import Data.List (last, intersperse, sortBy, intercalate, isInfixOf)
import Data.List.Split (splitOn)
import Data.Char (isLetter, ord, chr)