Minor bugfix

Use seq_along(x) rather than 1:length(x).
Prefer seq_along(x) to 1:length(x)
Merge pull request #5 from pdmetcalfe/bugfix/seq_along

More of a style preference than a bugfix...