Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *````
• ````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *`````` *``````
• `````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *````
• ````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *`````` *`````` *`````
• ``````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *````
• ````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *`````` *``````
• `````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *````
• ````Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``
• ```Here is my solution to adventcode problem 7  using F#.

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

I am using the adventofcode to improve my functional programming skills. The gist of the problem is to solve the logic gates which is represented as 16 bit integer’s  and these depend on other gates.

The puzzle starts of with simple problem

• `123 -> x`
• `456 -> y` *``` *`````` *`````` *`````` *```````
• `NOT y -> i`

where the if you solve the above the code should work. But the complexity comes in when the order of the gates are not as expected and so the code would have solve the dependent ones before solving the entire solution.

One of the things that I really love about the FP code is union types and pattern matching.

That is the composite  type that could hold multiple different data types. In a non-functional static language I would have ended up creating nested types for each one of these.

My solutions to the adventofcode is here https://github.com/naveensrinivasan/adventcode/

After finishing I realized that I could have used the Tree structure which could help in traversal of the tree.

[gist id = “6d162d9f631cd636d14b”] which would have made this problem simpler.

Here is my solution.

[gist id = “6165418036481bae3756”]