Isn't this as simple as writing a `def slice(string, range)` line above the clauses to force the signature?