@mikuroxina/mini-fn
    Preparing search index...

    Function drop

    • Drops the prefix of length count. If count >= length(list), the empty list will be returned.

      Parameters

      • count: number

        The length to drop.

      Returns <T>(list: List.List<T>) => List.List<T>

      The dropped list.

      Examples

      const dropped = drop(2)(range(1, 6));
      const iter = toIterator(dropped);
      expect(iter.next()).toStrictEqual({ value: 3, done: false });
      expect(iter.next()).toStrictEqual({ value: 4, done: false });
      expect(iter.next()).toStrictEqual({ value: 5, done: false });
      expect(iter.next()).toStrictEqual({ value: undefined, done: true });