src/Heterogeny/Seq.php
public function reduceRight(callable $function)
    {
        if ($this->isEmpty()) {
            return null;
        }

        list($head, $tail) = $this->reverse()->headAndTail();

        return array_reduce($tail->all(), $function, $head);
    }
public function reduceRight(callable $function)
    {
        if ($this->isEmpty()) {
            return null;
        }

        list($head, $tail) = $this->reverse()->headAndTail();

        return array_reduce($tail->all(), $function, $head);
    }
public function reduceRight ( callable $ function ) { if ( $ this -> isEmpty ( ) ) { return null ; } list ( $ head , $ tail ) = $ this -> reverse ( ) -> headAndTail ( ) ; return array_reduce ( $ tail -> all ( ) , $ function , $ head ) ; }
Reduces `Seq` items to the right

Reduce does not take any initial value, instead,
it uses head as initial.

@param callable $function function which will reduce the Seq

@return mixed|null
Reduces Seq items to the right