Summary
In this chapter, we learned even more about how diverts work with knots and stitches in ink. We explored how the concept of a tunnel connects two different sections in ink. When a story runs, the flow moves to the knot or the stitch and then returns with the use of two diverts, ->->
. We also reviewed how tunnels can be used as part of a more complicated flow pattern of a longer series of connections between two sections. Next, we saw how threads, another concept in ink, act as the inverse of a divert, where a section is moved to the current flow location instead of the flow moving to its content. Finally, we examined some patterns of using tunnels inside threads to pass data to a knot and show the changed values of a variable.
Threads and tunnels, while more advanced concepts, create simpler overall code. Threads allow developers to separate code into different sections and then thread them back together again. Tunnels allow developers to achieve the same general...