PHP Class phpstreams\Functions

Author: Bert Peters ([email protected])
Exibir arquivo Open project: bertptrs/phpstreams Class Usage Examples

Public Methods

Method Description
combine ( callable $a, callable $b ) : callable Combine two functions into one.
identity ( ) : callable Get an identity function.

Method Details

combine() public static method

This method creates a function that effectively is b(a(value)).
public static combine ( callable $a, callable $b ) : callable
$a callable
$b callable
return callable

identity() public static method

Get an identity function.
public static identity ( ) : callable
return callable A function that returns its first argument.