def fooify(x: int | list[int])
If x is a list, the result is a list
I don’t think that the type system can describe this.
def fooify(x: int | list[int])