Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "iter/first/docs/types/index.d"

Index

Functions

Functions

Export assignment iterFirst

  • Returns the first iterated value.

    Notes

    • The function does not consume an entire iterator before returning.

    Parameters

    Returns any

    first iterated value

    Example

    var array2iterator = require( `@stdlib/array/to-iterator` );
    
    var it = array2iterator( [ 1, 0, 0, 0, 0 ] );
    
    var v = iterFirst( it );
    // returns 1