PHP Classes

File: values.php

Recommend this page to a friend!
  Classes of Nathaniel Sherwood   Encase PHP Functional Programming   values.php   Download  
File: values.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Encase PHP Functional Programming
Make functions work as if they are class functions
Author: By
Last change:
Date: 5 years ago
Size: 353 bytes
 

Contents

Class file image Download
<?php
namespace Encase\Functional;

/**
 * Re-index the traversable, array or object. Equivalent to calling
 * map($iterable).
 *
 * @param \Traversable|iterable|stdClass|null $iterable
 * @return $iterable
 */
function values($iterable)
{
   
assertType($iterable, ['\Traversable', 'iterable', 'stdClass', 'null'], 'iterable');
    return
map($iterable);
}