modifyNode f Leaf (b:bs) = 
    if b
    then Branch Nothing Leaf (modifyNode f Leaf bs)
    else Branch Nothing (modifyNode f Leaf bs) Leaf
modifyNode f Leaf (b:bs) = 
    if b
    then Branch Nothing Leaf (modifyNode f Leaf bs)
    else Branch Nothing (modifyNode f Leaf bs) Leaf
modifyNode f Leaf (b:bs) = 
    if b
    then Branch Nothing Leaf (modifyNode f Leaf bs)
    else Branch Nothing (modifyNode f Leaf bs) Leaf