In this Kata, you will be given a string of numbers in sequence and your task will be to return the missing number. If there is no number
missing or there is an error in the sequence, return `-1`.
For example:
```Haskell
missing("123567") = 4 
missing("899091939495") = 92
missing("9899101102") = 100
missing("599600601602") = -1 -- no number missing
missing("8990919395") = -1 -- error in sequence. Both 92 and 94 missing.
```
The sequence will always be in ascending order.
More examples in the test cases. 
Good luck!
def missing(s):
    def missing(s, base, candidate=-1):
        head, tail = int(s[:base]), s[base:]
        if tail.startswith(str(head + 1)):
            return missing(tail, len(str(head + 1)), candidate)
        if tail.startswith(str(head + 2)):
            return missing(tail, len(str(head + 2)), head + 1) if candidate == -1 else -1
        return candidate if tail == "" else -1
    for base in range(1, len(s) // 2 + 1):
        result = missing(s, base)
        if result != -1:
            return result
    return -1
def missing(s):
    def missing(s, base, candidate=-1):
        head, tail = int(s[:base]), s[base:]
        if tail.startswith(str(head + 1)):
            return missing(tail, len(str(head + 1)), candidate)
        if tail.startswith(str(head + 2)):
            return missing(tail, len(str(head + 2)), head + 1) if candidate == -1 else -1
        return candidate if tail == "" else -1
    for base in range(1, len(s) // 2 + 1):
        result = missing(s, base)
        if result != -1:
            return result
    return -1