public function build(array $segments)
    {
        $results = [];
        foreach ($segments as $segment) {
            $result = $this->buildSegment($segment);

            if (null === $result) {
                continue;
            }

            $results[] = $result;
        }

        return '/' . implode('/', $results);
    }