A single substitution replaces one glyph by one other glyph. An example that will turn lowercase letters into small caps:

lookup smallCaps {
    sub [a - z] -> [A.small - Z.small];
    sub [alpha - sigma1] -> [Alpha.small - Sigma.small];
    sub [sigma - omega] -> [Sigma.small - Omega.small];
}

Any glyph list you supply at the left side of -> must have exactly the same length as the glyph list on the right.

Note: the order in which you specify the various parts and how you separate the parts does not matter. The file output would have been exactly the same if the lookup had been formulated:

    sub a -> A.small;
    sub b -> B.small;
    sub c -> C.small;
    sub d -> D.small;
    [...]

The table data that is written to the output file is optimised automatically.