# From void to Unit

In some functional languagens **all** functions needs to return a value. For the cases when there aren't a value to returns is used the `Unit` type.

The unit type resembles the void type. But in this case, is possible to instance and creates values of `Unit` types.

It is a concrete type, you can create variables and returns `Unit` normally, but it has no data or behavior.

This type is specially useful to allow the cast between `Action` and `Func` delegates, besides that, it allows operations that can't create a value in a chainable composition.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gabriel-schade-cardoso.gitbook.io/tango/fundamentals/from-void-to-unit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
