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

Main

Description

https://adventofcode.com/2015/day/1

Count open and closing parentheses.

>>> :main + "(())\n"
0
>>> :main + "()()\n"
0
>>> :main + "(((\n"
3
>>> :main + "(()(()(\n"
3
>>> :main + "))(((((\n"
3
1
>>> :main + "())\n"
-1
3
>>> :main + "))(\n"
-1
1
>>> :main + ")))\n"
-3
1
>>> :main + ")())())\n"
-3
1
>>> :main + "()())\n"
-1
5
Synopsis

Documentation

main :: IO () Source #

>>> :main
138
1771