Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 485 Bytes

some.md

File metadata and controls

32 lines (23 loc) · 485 Bytes

some

Description

Check if some value of the collection satisfies the function

Parameters

fn
Function to check if the predicate is true.
coll
Collection of values to check some is true by the `$fn`.

Examples

Check if some value is bigger than 10:

<?php

use function Lambdish\Phunctional\some;

return some(
    function ($number) {
        return $number > 10;
    }, 
    [1, 4, 3, 9, 5]
);

// false