Skip to content

Commit

Permalink
[Chapter 5] Add a not on Unit (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zelenya authored Nov 11, 2023
1 parent 2e9176c commit 874eefe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions text/chapter5.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,14 @@ Just like `pure`, we can apply the `guard` function in PSCi to understand how it
forall (m :: Type -> Type). Alternative m => Boolean -> m Unit
```

> The `Unit` type represents values with no computational content — the absence of a concrete meaningful value.
>
> We often use `Unit` "wrapped" in a type constructor as the return type of a computation where we only care about the _effects_ of the computation (or a "shape" of the result) and not some concrete value.
>
> For example, the `main` function has the type `Effect Unit`. Main is an entry point to the project — we don't call it directly.
>
> We'll explain what `m` in the type signature means in Chapter 6.
In our case, we can assume that PSCi reported the following type:

```haskell
Expand Down

0 comments on commit 874eefe

Please sign in to comment.