protected function flatMap(array $flattened, MonadInterface $result)
    {
        $value = $result->get();

        if (!is_array($value)) {
            $value = [ $value ];
        }

        return array_merge($flattened, $value);
    }