Both `
pad` and `
repeat` can be defined in terms of each other, but `
repeat` is much simpler, so it makes sense for `
pad` to be "canonically" defined in terms of `
repeat`. I agree that `
repeat` doesn't seem so useful, especially if `
pad` exists as an alternative.
BTW, padding doesn't have to be only whitespace. Example:
```automate
pad(pad("hello world", " ", 1), "-", 3)
=
"--- hello world ---"
```
Of course, that example assumes the 2nd argument is absolute, not relative.
It seems padding is relative in most languages:
```javascript
'a'.padStart(3, '_').padEnd(5, '_') === '__a__'
```