/// <summary>
        /// Computes the hash-code for the <see cref="Optional{T}"/> instance.
        /// </summary>
        public override int GetHashCode()
        {
            const int hash = 17;

            if (IsValue())
            {
                return(InternalValue !.GetHashCode() ^ 31);
            }
            if (IsException())
            {
                return(InternalException.GetHashCode() ^ 31);
            }
            return(hash ^ 29);
        }