oning behind using the equality component to test for even numbers is flawed because of the data matching used by gh. It is testing like this:
0==0 True
2==1 False
4==2 False
6==3 False
etc
.............
Where as a Modulo 2 would work like this
0%2 = 0
1%2 = 1
2%2 = 0
3%2 = 1
4%2 = 0
5%2 = 1
6%2 = 0
7%2 = 1
8%2 = 0
9%2 = 1
......
Also I notice you have some errors in your expressions producing Nulls.
If you want it to be twice the value then you should have 2*D in the Expression and 10*D in the other
....
I attach a working version.…
i-branches is removing similar branches. This will only be removing 0's.
e.g.
{1;1;1;3;0}
{1;1;1;4;0}
{1;1;1;5;0}
would end up after Simplify as:
{3}
{4}
{5}
But the single branch (remove zeros algorithm, as summarised above) would give:
{1;1;1;3} …
that list to 1 and -1: 1,1,1,1,-1,-1,-1,-1,1,1,1,1...
Do definitely look more closely at lists, treas, cull, weave, etc. though. They are the solutions to 65% of GH problems.…