From 2415c1406758530b906efd619dd969365b9b4af2 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Fri, 22 Sep 2023 16:27:49 -0700 Subject: [PATCH] minor --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8e9ddfd3..5a6c7d58b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Drawing inspiration from [ZIO](https://zio.dev/)'s [effect rotation](https://deg 1. [The `>` type](#the--type) 2. [Effect widening](#effect-widening) 3. [Using effects](#using-effects) +3. [Direct Syntax](#direct-syntax) 4. [Core Effects](#core-effects) 1. [Aborts: Short Circuiting](#aborts-short-circuiting) 2. [IOs: Side Effects](#ios-side-effects) @@ -247,9 +248,9 @@ val b: String > (Tries with Options) = > Note: In the above example, the await method is used to extract values from computations. Specifically, `await(Options.get(Some("hello")))` takes a computation of type `String > Options` and returns a `String`, while `await(Tries.get(Try("world")))` takes a computation of type `String > Tries` and also returns a `String`. -The use of `await` within the defer `block` provides a syntax sugar that simplifies the expression of effectful computations. Under the hood, the direct macro rewrites the computation in terms of map, allowing developers to work with effectful computations as if they were pure values, seamlessly integrating them into the flow of the program. +The use of `await` within the defer `block` provides a syntax sugar that simplifies the expression of effectful computations. Under the hood, the direct macro rewrites the computation in terms of `map`, allowing developers to work with effectful computations as if they were pure values, seamlessly integrating them into the flow of the program. -The direct syntax emphasizes "effectful hygiene" to ensure that computations are properly sequenced and managed. Within a `defer` block, any computation of the `>` type must be encapsulated by an `await` block. This mechanism guarantees that all effectful computations are explicitly awaited, eliminating the risks of inadvertently overlooking effects or misordering operations. +The direct syntax emphasizes effectful hygiene to ensure that computations are properly sequenced and managed. Within a `defer` block, any computation of the `>` type must be encapsulated by an `await` block. This mechanism guarantees that all effectful computations are explicitly awaited, eliminating the risks of inadvertently overlooking effects or misordering operations. ```scala import kyo.ios._