Brackets, braces, and parens, oh my!
Posted 3 Jul 2013 by JC
If you’ve read the knitspeak guide, you know that brackets [ ]
let you repeat a series of instructions a set number of times – for example:
- Row 1 (RS): Knit.
- Row 2: Purl.
- Row 3: K3, *[k2tog] 3 times, [yo, k1] 5 times, yo, [k2tog] 3 times, repeat from *, k3.
- Row 4: Knit.
Being able to say [yo, k1] 5 times
is more convenient than having to say yo, k1, yo, k1, yo, k1, yo, k1, yo, k1
, isn’t it?
Here’s another convenience: now you can use parens ( )
and braces { }
in the same way:
- ...
- Row 3: K3, *[k2tog] 3 times, (yo, k1) 5 times, yo, {k2tog} 3 times, repeat from *, k3.
- ...
Of course, the pairs have to match up. You can’t say things like (yo, k1} 5 times
. That just looks silly, doesn’t it?