TOC Toolkit API - v0.1.0
    Preparing search index...

    Interface Alphabet

    An ordered set of symbols without repeats. An alphabet comes from Alphabet.create alone, so every alphabet has passed its checks.

    interface Alphabet {
        symbols: readonly AlphabetSymbol[];
        indices: readonly SymbolIndex[];
        get size(): number;
        indexOf(symbol: string): Maybe<SymbolIndex>;
        symbolAt(index: SymbolIndex): AlphabetSymbol;
    }
    Index
    symbols: readonly AlphabetSymbol[]

    The symbols in the order of their indices.

    indices: readonly SymbolIndex[]

    The index of every symbol, in order, for a loop over the alphabet.

    • get size(): number

      The number of symbols.

      Returns number

    • Returns the index of the symbol with the given name, or undefined for a foreign name.

      Parameters

      • symbol: string

      Returns Maybe<SymbolIndex>