ixfx
    Preparing search index...

    Function mutable

    • Creates a stack. Mutable. Use Stacks.immutable for an immutable alternative.

      Type Parameters

      • V

      Parameters

      • opts: StackOpts = {}
      • ...startingItems: readonly V[]

      Returns IStackMutable<V>

      // Create
      const s = Stacks.mutable();
      // Add one or more items
      s.push(1, 2, 3, 4);

      // See what's on top
      s.peek; // 4

      // Remove the top-most, and return it
      s.pop(); // 4

      // Now there's a new top-most element
      s.peek; // 3