> For the complete documentation index, see [llms.txt](https://gabriel-schade-cardoso.gitbook.io/tango/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gabriel-schade-cardoso.gitbook.io/tango/modules/option/exists.md).

# Exists

Returns true if the `option IsSome` and the `predicate` return true when applied it. Otherwise, returns false.

| Parameters                                              | Returns |
| ------------------------------------------------------- | ------- |
| <p>Func\<T, bool> predicate</p><p>Option\<T> option</p> | bool    |

## Usage

When the `Option<T>` `IsNone` the results will be always `false`, Otherwise the `predicate` function will be applied to the `Option` and its returns will be the returned value.

&#x20;**When the option value IsSome and predicates returns true**&#x20;

```csharp
Option<int> optionValue = 4;
bool result = optionValue.Exists(value => value % 2 == 0);

//result = true
```

&#x20;**When the option value IsSome and predicates returns false**

```csharp
Option<int> optionValue = 3;
bool result = optionValue.Exists(value => value % 2 == 0);

//result = false
```

&#x20;**When the option value IsNone**&#x20;

```csharp
Option<int> optionValue = Option<int>.None();
bool result = 
    optionValue.Exists(value => value % 2 == 0);

//result = false
```
