time-to-botec

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

repl.txt (1135B)


      1 
      2 {{alias}}( predicate )
      3     Returns a function which tests if every element in an array-like object
      4     passes a test condition.
      5 
      6     The predicate function should accept a single argument: an element from an
      7     array-like object. If the element satisfies a test condition, the function
      8     should return `true`; otherwise, the function should return `false`.
      9 
     10     Given an input array-like object, the returned function returns `true` if
     11     all elements pass the test and `false` otherwise.
     12 
     13     The returned function returns `false` if provided an empty array-like
     14     object.
     15 
     16     The returned function returns `false` is not provided an array-like object.
     17 
     18     Parameters
     19     ----------
     20     predicate: Function
     21         Function to apply.
     22 
     23     Returns
     24     -------
     25     fcn: Function
     26         Function which tests if every element in an array-like object passes a
     27         test condition.
     28 
     29     Examples
     30     --------
     31     > var fcn = {{alias}}( {{alias:@stdlib/assert/is-odd}} );
     32     > var arr = [ 1, 3, 5, 7 ];
     33     > var bool = fcn( arr )
     34     true
     35     > arr = [ 3, 5, 8 ];
     36     > bool = fcn( arr )
     37     false
     38 
     39     See Also
     40     --------
     41