protected function filterRecursive(Closure $function, $items)
    {
        if ( ! $this->isArrayable($items)) return $items;

        foreach ($items as $key => $item)
        {
            $items[$key] = $this->filterRecursive($function, $this->retrieveValue($item));
        }

        return array_filter($items, $function);
    }