<commit_before>using System;

namespace ParsecSharp
{
    public abstract class Result<TToken, T>
    {
        public abstract T Value { get; }

        protected IParsecStateStream<TToken> Rest { get; }

        protected Result(IParsecStateStream<TToken> state)
        {
            this.Rest = state;
        }

        internal abstract Result<TToken, TResult> Next<TNext, TResult>(Func<T, Parser<TToken, TNext>> next, Func<Result<TToken, TNext>, Result<TToken, TResult>> cont);

        public abstract TResult CaseOf<TResult>(Func<Fail<TToken, T>, TResult> fail, Func<Success<TToken, T>, TResult> success);

        public abstract Result<TToken, TResult> Map<TResult>(Func<T, TResult> function);

        internal Suspended Suspend()
            => new Suspended(this);

        public readonly struct Suspended
        {
            private readonly Result<TToken, T> _result;

            internal Suspended(Result<TToken, T> result)
            {
                this._result = result;
            }

            public void Deconstruct(out Result<TToken, T> result, out IParsecStateStream<TToken> rest)
            {
                result = this._result;
                rest = this._result.Rest;
            }
        }
    }
}<commit_msg>add sealed overrides for Result<commit_after>using System;

namespace ParsecSharp
{
    public abstract class Result<TToken, T>
    {
        public abstract T Value { get; }

        protected IParsecStateStream<TToken> Rest { get; }

        protected Result(IParsecStateStream<TToken> state)
        {
            this.Rest = state;
        }

        internal abstract Result<TToken, TResult> Next<TNext, TResult>(Func<T, Parser<TToken, TNext>> next, Func<Result<TToken, TNext>, Result<TToken, TResult>> cont);

        public abstract TResult CaseOf<TResult>(Func<Fail<TToken, T>, TResult> fail, Func<Success<TToken, T>, TResult> success);

        public abstract Result<TToken, TResult> Map<TResult>(Func<T, TResult> function);

        internal Suspended Suspend()
            => new Suspended(this);

        public sealed override bool Equals(object? obj)
            => base.Equals(obj);

        public sealed override int GetHashCode()
            => base.GetHashCode();

        public readonly struct Suspended
        {
            private readonly Result<TToken, T> _result;

            internal Suspended(Result<TToken, T> result)
            {
                this._result = result;
            }

            public void Deconstruct(out Result<TToken, T> result, out IParsecStateStream<TToken> rest)
            {
                result = this._result;
                rest = this._result.Rest;
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09663087745279526, 'fraction_numerical': 0.0, 'mean_word_length': 2.224343675417661, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '343066', 'n_tokens_mistral': 773, 'n_tokens_neox': 743, 'n_words': 193}