Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
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