Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
fwbrasil committed Sep 18, 2023
1 parent fca932d commit b6111d8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ In some specific cases where Kyo isn't used as the main effect system of an appl
val a: Int > IOs =
IOs(42)

// ** Avoid 'IOs.run' this, use 'kyo.App' instead) **
// ** Avoid 'IOs.run', use 'kyo.App' instead) **
val b: Int =
IOs.run(a).pure
// ** Avoid 'IOs.run' this, use 'kyo.App' instead) **
// ** Avoid 'IOs.run', use 'kyo.App' instead) **
```

The `runLazy` method accepts computations with other effects but it doesn't guarantee that all side effects are performed before the method returns. If other effects still have to be handled, the side effects can be executed later once the other effects are handled. This a low-level API that must be used with caution.
Expand All @@ -268,11 +268,11 @@ val a: Int > (Options with IOs) =
}
}

// ** Avoid 'IOs.runLazy' this, use 'kyo.App' instead) **
// ** Avoid 'IOs.runLazy', use 'kyo.App' instead) **
// Handle the 'IOs' effect lazily
val b: Int > Options =
IOs.runLazy(a)
// ** Avoid 'IOs.runLazy' this, use 'kyo.App' instead) **
// ** Avoid 'IOs.runLazy', use 'kyo.App' instead) **

// Since the computation is suspended with the
// 'Options' effect first, the lazy IOs execution
Expand Down Expand Up @@ -406,7 +406,7 @@ val b: Int > IOs =
Resources.run(a)
```

### Choices: Decision Making and Exploration
### Choices: Exploratory Branching

The `Choices` effect is designed to aid in handling and exploring multiple options, pathways, or outcomes in a computation. This effect is particularly useful in scenarios where you're dealing with decision trees, backtracking algorithms, or any situation that involves dynamically exploring multiple options.

Expand Down Expand Up @@ -882,6 +882,10 @@ val b: Boolean > IOs =

> A `Promise` is basically a `Fiber` with all the regular functionality plus the `complete` method to manually fulfill the promise.
### Channels: Asynchronous Communication



License
-------

Expand Down

0 comments on commit b6111d8

Please sign in to comment.