time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (937B)


      1 
      2 {{alias}}( value )
      3     Tests if a value is iterable-like.
      4 
      5     In order to be iterable, an object must implement the @@iterator method,
      6     which, when called, returns an iterator protocol-compliant object.
      7 
      8     An iterator protocol-compliant object is an object having a `next` method
      9     which adheres to the iterator protocol.
     10 
     11     As full iterator compliance is impossible to achieve without evaluating an
     12     iterator, this function checks *only* for interface compliance.
     13 
     14     In environments lacking Symbol.iterator support, this function always
     15     returns `false`.
     16 
     17     Parameters
     18     ----------
     19     value: any
     20         Value to test.
     21 
     22     Returns
     23     -------
     24     bool: boolean
     25         Boolean indicating whether value is iterable-like.
     26 
     27     Examples
     28     --------
     29     > var bool = {{alias}}( [ 1, 2, 3 ] )
     30     <boolean>
     31     > bool = {{alias}}( {} )
     32     false
     33     > bool = {{alias}}( null )
     34     false
     35 
     36     See Also
     37     --------
     38