src/SellerLabs/Nucleus/Support/Std.php
public static function foldr(callable $function, $initial, $foldable)
    {
        Arguments::define(Boa::func(), Boa::any(), Boa::foldable())
            ->check($function, $initial, $foldable);

        return ComplexFactory::toFoldable($foldable)
            ->foldr($function, $initial);
    }
public static function foldr(callable $function, $initial, $foldable)
    {
        Arguments::define(Boa::func(), Boa::any(), Boa::foldable())
            ->check($function, $initial, $foldable);

        return ComplexFactory::toFoldable($foldable)
            ->foldr($function, $initial);
    }
public static function foldr ( callable $ function , $ initial , $ foldable ) { Arguments :: define ( Boa :: func ( ) , Boa :: any ( ) , Boa :: foldable ( ) ) -> check ( $ function , $ initial , $ foldable ) ; return ComplexFactory :: toFoldable ( $ foldable ) -> foldr ( $ function , $ initial ) ; }
Same as foldl but it works from right to left.

@param callable $function
@param mixed $initial
@param array|FoldableInterface $foldable

@return mixed
Same as foldl but it works from right to left .