Copyright | (c) Eric Mertens 2019 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
https://adventofcode.com/2019/day/7
To compute our thrust controller feedback loop I evaluate the given Intcode program as a function from input values to output values. Connecting the outputs of one instance of the program to the inputs of the next is as simple as composing the two functions together. Thanks to non-strict evaluation I can pass the output of a composition of these functions back in as its own input!