This is from real code. We have a string of DNA nucleotides (or amino acid residues), and also a list of the distances between successive
gaps to insert in the string (this is run-length encoding for alignments). Now put the gaps into the sequence: transform
gapify 'ACGTACGTACGT',2,4,5 into
'AC-GTAC-GTACG-T' (gaps after 2 letters, then 4, then 5).
It's also a nice example of how to use substr as an lvalue.