User defined function, recursion and passing self along

That again brings up 'Wouldn’t it be better to return true/false instead of a potentially usable value from death?`. :slight_smile:

Since it ‘sometimes’ returns self it seems like you could do myArray.uniq!.sort, but that will die at times, seemingly very randomly too. ^.^

With proper typing that would be impossible, either you’d always have to return self, so .sort would always work, or you’d have to return some variant of self | nil, meaning you’d have to match on it or default it out or so. true | false makes so much more sense in that context. :slight_smile: