We can construct immutable Quilts. A quilt is a grid of squares.
There are only two squares: b and c.
There are two operations
turn and sew.
| Command | Meaning |
|---|---|
| Quilt.b |
![]() |
| Quilt.c |
![]() |
| Quilt.b.turn() |
![]() |
| Quilt.b.sew(Quilt.c) |
![]() ![]() |
The default program renders a b quilt.
Use the sew method to produce two b squares:


Create a row of four b squares.




Put two bs together, then turn.


Use the previous answer and sew it to the same again.




Turn the c twice to produce thick and thin stripes.



